mirror of https://github.com/wwarthen/RomWBW.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
1.4 KiB
86 lines
1.4 KiB
;
|
|
;==================================================================================================
|
|
; HBIOS ENVIRONMENT CONFIG VALUE EXPORT TOOL
|
|
;==================================================================================================
|
|
;
|
|
; Do we need a private stack???
|
|
;
|
|
#include "std.asm"
|
|
;
|
|
; Macro to make it simple to print a config value
|
|
;
|
|
#define prtval(tag,val) \
|
|
#defcont \ call PREFIX
|
|
#defcont \ call PRTSTRD
|
|
#defcont \ .text tag
|
|
#defcont \ call PRTEQ
|
|
#defcont \ ld hl,val
|
|
#defcont \ call PRTDEC
|
|
#defcont \ call EOL
|
|
;
|
|
; Program starts here
|
|
;
|
|
.org $100 ; Normal CP/M start address
|
|
;
|
|
; Print all desired config values...
|
|
;
|
|
#if (ROMSIZE > 0)
|
|
prtval("ROMSIZE$", ROMSIZE)
|
|
#else
|
|
prtval("ROMSIZE$", RAMSIZE)
|
|
#endif
|
|
prtval("CPUFAM$", CPUFAM)
|
|
;
|
|
ret
|
|
;
|
|
; Output correct prefix for command/shell
|
|
;
|
|
PREFIX:
|
|
#ifdef CMD
|
|
call PRTSTRD
|
|
.text "set $"
|
|
#endif
|
|
ret
|
|
;
|
|
; Output an equal sign
|
|
;
|
|
PRTEQ:
|
|
ld a,'='
|
|
call COUT
|
|
ret
|
|
;
|
|
; Output end-of-line. Handles differences between
|
|
; DOS/Windows and Unix.
|
|
;
|
|
EOL:
|
|
#ifdef CMD
|
|
ld a,13
|
|
call COUT
|
|
#endif
|
|
ld a,10
|
|
call COUT
|
|
ret
|
|
|
|
;
|
|
; Print a single character from register A.
|
|
; This routine is required by the utility routines included below.
|
|
;
|
|
COUT:
|
|
push af
|
|
push bc
|
|
push de
|
|
push hl
|
|
ld e,a
|
|
ld c,2
|
|
call $0005
|
|
pop hl
|
|
pop de
|
|
pop bc
|
|
pop af
|
|
ret
|
|
;
|
|
; Include the utility routines
|
|
;
|
|
#include "util.asm"
|
|
;
|
|
.end
|