From 39b2e4a9ff2a0579c98cb3320e14404b59455f0e Mon Sep 17 00:00:00 2001 From: Lionel Debroux Date: Tue, 3 Sep 2019 22:57:39 +0200 Subject: [PATCH] WIP libticalcs: switch the TI-Z80 DBUS ROM dumpers from spasm to pasmo, which has been packaged by Debian for a long time, so that more ROM dumpers can be integrated in Debian packages. TODO switch the 84+ DUSB ROM dumper as well. I tried to use other Z80 cross-assemblers packaged by Debian, but: * z80asm, SDCC's sdasz80 and crasm do not support defining stuff through the CLI, which would require annoying workarounds; * binutils-z80's z80-unknown-coff-as doesn't handle .org the same way as other assemblers, and the multiple section + ldscript workaround does not work either, because as forbids + or - between symbols from different sections (even if they're both ".text.X" sections)... No cross-assembler packaged by Debian supports eZ80 instructions. Signed-off-by: Lionel Debroux --- libticalcs/trunk/configure.ac | 24 +- libticalcs/trunk/src/romdump_8x/Makefile.am | 23 +- libticalcs/trunk/src/romdump_8x/data.asm | 20 +- libticalcs/trunk/src/romdump_8x/font.asm | 546 +++++++++--------- libticalcs/trunk/src/romdump_8x/link.asm | 30 +- libticalcs/trunk/src/romdump_8x/link83p.asm | 4 +- libticalcs/trunk/src/romdump_8x/linksw.asm | 36 +- libticalcs/trunk/src/romdump_8x/main.asm | 40 +- libticalcs/trunk/src/romdump_8x/romdump.asm | 192 +++--- libticalcs/trunk/src/romdump_8x/romdump.inc | 22 +- libticalcs/trunk/src/romdump_8x/ti73defs.inc | 44 +- libticalcs/trunk/src/romdump_8x/ti82defs.inc | 43 +- libticalcs/trunk/src/romdump_8x/ti83defs.inc | 46 +- libticalcs/trunk/src/romdump_8x/ti83pdefs.inc | 45 +- .../trunk/src/romdump_8x/ti84pcdefs.inc | 47 +- libticalcs/trunk/src/romdump_8x/ti85defs.inc | 41 +- libticalcs/trunk/src/romdump_8x/ti86defs.inc | 39 +- 17 files changed, 708 insertions(+), 534 deletions(-) diff --git a/libticalcs/trunk/configure.ac b/libticalcs/trunk/configure.ac index 98e24f42a..a96d42992 100644 --- a/libticalcs/trunk/configure.ac +++ b/libticalcs/trunk/configure.ac @@ -205,12 +205,15 @@ AC_ARG_ENABLE([builtin-rom-dumpers], [], [enable_builtin_rom_dumpers=yes]) AC_ARG_VAR([SPASM], [SPASM Z80 assembler]) +AC_ARG_VAR([PASMO], [PASMO Z80 assembler]) AC_ARG_VAR([TIPACK], [Tool for creating TI variable files]) have_spasm=no +have_pasmo=no have_tipack=no have_tigcc=no have_m68klinuxgnu=no : ${SPASM=spasm} +: ${PASMO=pasmo} : ${TIPACK=tipack} if test "x$enable_builtin_rom_dumpers" != "xyes" ; then @@ -226,7 +229,22 @@ EOF fi AC_MSG_RESULT([$have_spasm]) - if test "x$have_spasm" = "xyes" ; then + AC_MSG_CHECKING([whether $PASMO works]) + cat >conftest.asm <&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then + have_pasmo=yes + fi + AC_MSG_RESULT([$have_pasmo]) + + if test "x$have_spasm$have_pasmo" = "xyesyes" ; then AC_MSG_CHECKING([whether $TIPACK works]) if "$TIPACK" conftest.bin -p -o conftest.8xp >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ; then have_tipack=yes @@ -266,12 +284,12 @@ EOF AC_MSG_RESULT([$have_m68klinuxgnu]) fi -if test "x$have_spasm$have_tipack" = "xyesyes" ; then +if test "x$have_spasm$have_pasmo$have_tipack" = "xyesyesyes" ; then build_z80_rom_dumpers=yes else build_z80_rom_dumpers=no if test "x$enable_builtin_rom_dumpers" = "xno" ; then - AC_MSG_FAILURE([spasm and/or tipack are not installed or are not usable.]) + AC_MSG_FAILURE([spasm, pasmo and/or tipack are not installed or are not usable.]) fi fi diff --git a/libticalcs/trunk/src/romdump_8x/Makefile.am b/libticalcs/trunk/src/romdump_8x/Makefile.am index 508d8bbeb..5f4e6fe35 100644 --- a/libticalcs/trunk/src/romdump_8x/Makefile.am +++ b/libticalcs/trunk/src/romdump_8x/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = *.asm *.inc CLEANFILES = *.bin *.lst *.73p *.82y *.83p *.8xp *.85s *.86p -SPASMFLAGS = -N -T +PASMOFLAGS = rom_dumpers = dump73.73p dump82.82y dump83.83p dump83p.8xp dump84pc.8xp dump85.85s dump86.86p @@ -11,33 +11,40 @@ endif dump73.bin: romdump.asm romdump.inc ti73defs.inc defs.inc main.asm \ unlock73.asm packet.asm link.asm linksw.asm data.asm - $(SPASM) $(SPASMFLAGS) -A -DTI73 -I $(srcdir) $(srcdir)/romdump.asm dump73.bin + $(PASMO) $(PASMOFLAGS) -E TI73 -E CALC_FLASH -I $(srcdir) $(srcdir)/romdump.asm dump73_.bin + sed -e "s/\xaa\xaa//g" < dump73_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump73.bin dump82.bin: romdump.asm romdump.inc ti82defs.inc defs.inc main.asm \ packet.asm link.asm linksw.asm display.asm display82.asm data.asm \ font.asm - $(SPASM) $(SPASMFLAGS) -A -DTI82 -I $(srcdir) $(srcdir)/romdump.asm dump82.bin + $(PASMO) $(PASMOFLAGS) -E TI82 -E NEED_DISPLAY_ROUTINES -I $(srcdir) $(srcdir)/romdump.asm dump82_.bin + sed -e "s/\xaa\xaa//g" < dump82_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump82.bin dump83.bin: romdump.asm romdump.inc ti83defs.inc defs.inc main.asm \ packet.asm link.asm linksw.asm data.asm - $(SPASM) $(SPASMFLAGS) -A -DTI83 -I $(srcdir) $(srcdir)/romdump.asm dump83.bin + $(PASMO) $(PASMOFLAGS) -E TI83 -I $(srcdir) $(srcdir)/romdump.asm dump83_.bin + sed -e "s/\xaa\xaa//g" < dump83_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump83.bin dump83p.bin: romdump.asm romdump.inc ti83pdefs.inc defs.inc main.asm \ unlock83p.asm packet.asm link.asm link83p.asm data.asm - $(SPASM) $(SPASMFLAGS) -A -DTI83P -I $(srcdir) $(srcdir)/romdump.asm dump83p.bin + $(PASMO) $(PASMOFLAGS) -E TI83P -E CALC_FLASH -E CALC_LINK_ASSIST -I $(srcdir) $(srcdir)/romdump.asm dump83p_.bin + sed -e "s/\xaa\xaa//g" < dump83p_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump83p.bin dump84pc.bin: romdump.asm romdump.inc ti84pcdefs.inc defs.inc main.asm \ packet.asm link.asm link83p.asm data.asm - $(SPASM) $(SPASMFLAGS) -A -DTI84PC -I $(srcdir) $(srcdir)/romdump.asm dump84pc.bin + $(PASMO) $(PASMOFLAGS) -E TI84PC -E CALC_LINK_ASSIST -I $(srcdir) $(srcdir)/romdump.asm dump84pc_.bin + sed -e "s/\xaa\xaa//g" < dump84pc_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump84pc.bin dump85.bin: romdump.asm romdump.inc ti85defs.inc defs.inc main.asm \ packet.asm link.asm linksw.asm display.asm display85.asm data.asm \ font.asm - $(SPASM) $(SPASMFLAGS) -A -DTI85 -I $(srcdir) $(srcdir)/romdump.asm dump85.bin + $(PASMO) $(PASMOFLAGS) -E TI85 -E NEED_DISPLAY_ROUTINES -I $(srcdir) $(srcdir)/romdump.asm dump85_.bin + sed -e "s/\xaa\xaa//g" < dump85_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump85.bin dump86.bin: romdump.asm romdump.inc ti86defs.inc defs.inc main.asm \ packet.asm link.asm linksw.asm data.asm - $(SPASM) $(SPASMFLAGS) -A -DTI86 -I $(srcdir) $(srcdir)/romdump.asm dump86.bin + $(PASMO) $(PASMOFLAGS) -E TI86 -I $(srcdir) $(srcdir)/romdump.asm dump86_.bin + sed -e "s/\xaa\xaa//g" < dump86_.bin | sed -e "s/\xaa\xe9/\xe9/g" > dump86.bin dump73.73p: dump73.bin $(TIPACK) -n 'ROMDUMP' dump73.bin -p -o dump73.73p diff --git a/libticalcs/trunk/src/romdump_8x/data.asm b/libticalcs/trunk/src/romdump_8x/data.asm index 84395675d..0861bfb8e 100644 --- a/libticalcs/trunk/src/romdump_8x/data.asm +++ b/libticalcs/trunk/src/romdump_8x/data.asm @@ -29,26 +29,26 @@ ErrorString: db "Errors:", 0 KString: db "0K of " - #if CALC_ROM_SIZE == 4096 + if CALC_ROM_SIZE = 4096 db "4096K" ROMSize: dw 0000h, 0040h - #endif + endif - #if CALC_ROM_SIZE == 512 + if CALC_ROM_SIZE = 512 db "512K" ROMSize: dw 0000h, 0008h - #endif + endif - #if CALC_ROM_SIZE == 128 + if CALC_ROM_SIZE = 128 db "128K" ROMSize: dw 0000h, 0002h - #endif + endif - #if CALC_ROM_SIZE == 256 + if CALC_ROM_SIZE = 256 db "256K" ROMSize: dw 0000h, 0004h - #endif + endif - #if CALC_ROM_SIZE == 0 + if CALC_ROM_SIZE = 0 ROMSize: dw 0000h, 0008h - #endif + endif diff --git a/libticalcs/trunk/src/romdump_8x/font.asm b/libticalcs/trunk/src/romdump_8x/font.asm index ff083b845..b03d71674 100644 --- a/libticalcs/trunk/src/romdump_8x/font.asm +++ b/libticalcs/trunk/src/romdump_8x/font.asm @@ -23,390 +23,390 @@ db ' ' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00000000b - db 00000000b - db 00000000b - db 00000000b - db 00000000b + db %00000000 + db %00000000 + db %00000000 + db %00000000 + db %00000000 + db %00000000 + db %00000000 db '.' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00000000b - db 00000000b - db 00000000b - db 00001100b - db 00001100b + db %00000000 + db %00000000 + db %00000000 + db %00000000 + db %00000000 + db %00001100 + db %00001100 db ':' ;;;SPRITE 8x7x1 - db 00000000b - db 00001100b - db 00001100b - db 00000000b - db 00001100b - db 00001100b - db 00000000b + db %00000000 + db %00001100 + db %00001100 + db %00000000 + db %00001100 + db %00001100 + db %00000000 db '[' ;;;SPRITE 8x7x1 - db 00001100b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001100b + db %00001100 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001100 db ']' ;;;SPRITE 8x7x1 - db 00011000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00011000b + db %00011000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00011000 db '0' ;;;SPRITE 8x7x1 - db 00011100b - db 00100010b - db 00100110b - db 00101010b - db 00110010b - db 00100010b - db 00011100b + db %00011100 + db %00100010 + db %00100110 + db %00101010 + db %00110010 + db %00100010 + db %00011100 db '1' ;;;SPRITE 8x7x1 - db 00001000b - db 00011000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00011100b + db %00001000 + db %00011000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00011100 db '2' ;;;SPRITE 8x7x1 - db 00011100b - db 00100010b - db 00000010b - db 00000100b - db 00001000b - db 00010000b - db 00111110b + db %00011100 + db %00100010 + db %00000010 + db %00000100 + db %00001000 + db %00010000 + db %00111110 db '3' ;;;SPRITE 8x7x1 - db 00111110b - db 00000100b - db 00001000b - db 00000100b - db 00000010b - db 00100010b - db 00011100b + db %00111110 + db %00000100 + db %00001000 + db %00000100 + db %00000010 + db %00100010 + db %00011100 db '4' ;;;SPRITE 8x7x1 - db 00000100b - db 00001100b - db 00010100b - db 00100100b - db 00111110b - db 00000100b - db 00000100b + db %00000100 + db %00001100 + db %00010100 + db %00100100 + db %00111110 + db %00000100 + db %00000100 db '5' ;;;SPRITE 8x7x1 - db 00111110b - db 00100000b - db 00111100b - db 00000010b - db 00000010b - db 00100010b - db 00011100b + db %00111110 + db %00100000 + db %00111100 + db %00000010 + db %00000010 + db %00100010 + db %00011100 db '6' ;;;SPRITE 8x7x1 - db 00001100b - db 00010000b - db 00100000b - db 00111100b - db 00100010b - db 00100010b - db 00011100b + db %00001100 + db %00010000 + db %00100000 + db %00111100 + db %00100010 + db %00100010 + db %00011100 db '7' ;;;SPRITE 8x7x1 - db 00111110b - db 00000010b - db 00000100b - db 00001000b - db 00010000b - db 00010000b - db 00010000b + db %00111110 + db %00000010 + db %00000100 + db %00001000 + db %00010000 + db %00010000 + db %00010000 db '8' ;;;SPRITE 8x7x1 - db 00011100b - db 00100010b - db 00100010b - db 00011100b - db 00100010b - db 00100010b - db 00011100b + db %00011100 + db %00100010 + db %00100010 + db %00011100 + db %00100010 + db %00100010 + db %00011100 db '9' ;;;SPRITE 8x7x1 - db 00011100b - db 00100010b - db 00100010b - db 00011110b - db 00000010b - db 00000100b - db 00011000b + db %00011100 + db %00100010 + db %00100010 + db %00011110 + db %00000010 + db %00000100 + db %00011000 db 'D' ;;;SPRITE 8x7x1 - db 00111100b - db 00100010b - db 00100010b - db 00100010b - db 00100010b - db 00100010b - db 00111100b + db %00111100 + db %00100010 + db %00100010 + db %00100010 + db %00100010 + db %00100010 + db %00111100 db 'E' ;;;SPRITE 8x7x1 - db 00111110b - db 00100000b - db 00100000b - db 00111100b - db 00100000b - db 00100000b - db 00111110b + db %00111110 + db %00100000 + db %00100000 + db %00111100 + db %00100000 + db %00100000 + db %00111110 db 'I' ;;;SPRITE 8x7x1 - db 00011100b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00011100b + db %00011100 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00011100 db 'K' ;;;SPRITE 8x7x1 - db 00100010b - db 00100100b - db 00101000b - db 00110000b - db 00101000b - db 00100100b - db 00100010b + db %00100010 + db %00100100 + db %00101000 + db %00110000 + db %00101000 + db %00100100 + db %00100010 db 'M' ;;;SPRITE 8x7x1 - db 00100010b - db 00110110b - db 00101010b - db 00101010b - db 00100010b - db 00100010b - db 00100010b + db %00100010 + db %00110110 + db %00101010 + db %00101010 + db %00100010 + db %00100010 + db %00100010 db 'O' ;;;SPRITE 8x7x1 - db 00011100b - db 00100010b - db 00100010b - db 00100010b - db 00100010b - db 00100010b - db 00011100b + db %00011100 + db %00100010 + db %00100010 + db %00100010 + db %00100010 + db %00100010 + db %00011100 db 'R' ;;;SPRITE 8x7x1 - db 00111100b - db 00100010b - db 00100010b - db 00111100b - db 00101000b - db 00100100b - db 00100010b + db %00111100 + db %00100010 + db %00100010 + db %00111100 + db %00101000 + db %00100100 + db %00100010 db 'T' ;;;SPRITE 8x7x1 - db 00111110b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b + db %00111110 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 db 'X' ;;;SPRITE 8x7x1 - db 00100010b - db 00100010b - db 00010100b - db 00001000b - db 00010100b - db 00100010b - db 00100010b + db %00100010 + db %00100010 + db %00010100 + db %00001000 + db %00010100 + db %00100010 + db %00100010 db 'a' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00011100b - db 00000010b - db 00011110b - db 00100010b - db 00011110b + db %00000000 + db %00000000 + db %00011100 + db %00000010 + db %00011110 + db %00100010 + db %00011110 db 'c' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00011100b - db 00100000b - db 00100000b - db 00100010b - db 00011100b + db %00000000 + db %00000000 + db %00011100 + db %00100000 + db %00100000 + db %00100010 + db %00011100 db 'e' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00011100b - db 00100010b - db 00111110b - db 00100000b - db 00011100b + db %00000000 + db %00000000 + db %00011100 + db %00100010 + db %00111110 + db %00100000 + db %00011100 db 'f' ;;;SPRITE 8x7x1 - db 00001100b - db 00010010b - db 00010000b - db 00111000b - db 00010000b - db 00010000b - db 00010000b + db %00001100 + db %00010010 + db %00010000 + db %00111000 + db %00010000 + db %00010000 + db %00010000 db 'g' ;;;SPRITE 8x7x1 - db 00000000b - db 00011110b - db 00100010b - db 00100010b - db 00011110b - db 00000010b - db 00011100b + db %00000000 + db %00011110 + db %00100010 + db %00100010 + db %00011110 + db %00000010 + db %00011100 db 'i' ;;;SPRITE 8x7x1 - db 00001000b - db 00000000b - db 00011000b - db 00001000b - db 00001000b - db 00001000b - db 00011100b + db %00001000 + db %00000000 + db %00011000 + db %00001000 + db %00001000 + db %00001000 + db %00011100 db 'l' ;;;SPRITE 8x7x1 - db 00011000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00001000b - db 00011100b + db %00011000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00001000 + db %00011100 db 'm' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00110100b - db 00101010b - db 00101010b - db 00100010b - db 00100010b + db %00000000 + db %00000000 + db %00110100 + db %00101010 + db %00101010 + db %00100010 + db %00100010 db 'n' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00101100b - db 00110010b - db 00100010b - db 00100010b - db 00100010b + db %00000000 + db %00000000 + db %00101100 + db %00110010 + db %00100010 + db %00100010 + db %00100010 db 'o' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00011100b - db 00100010b - db 00100010b - db 00100010b - db 00011100b + db %00000000 + db %00000000 + db %00011100 + db %00100010 + db %00100010 + db %00100010 + db %00011100 db 'p' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00111100b - db 00100010b - db 00111100b - db 00100000b - db 00100000b + db %00000000 + db %00000000 + db %00111100 + db %00100010 + db %00111100 + db %00100000 + db %00100000 db 'r' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00101100b - db 00110010b - db 00100000b - db 00100000b - db 00100000b + db %00000000 + db %00000000 + db %00101100 + db %00110010 + db %00100000 + db %00100000 + db %00100000 db 's' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00011100b - db 00100000b - db 00011100b - db 00000010b - db 00111100b + db %00000000 + db %00000000 + db %00011100 + db %00100000 + db %00011100 + db %00000010 + db %00111100 db 't' ;;;SPRITE 8x7x1 - db 00010000b - db 00010000b - db 00111000b - db 00010000b - db 00010000b - db 00010010b - db 00001100b + db %00010000 + db %00010000 + db %00111000 + db %00010000 + db %00010000 + db %00010010 + db %00001100 db 'u' ;;;SPRITE 8x7x1 - db 00000000b - db 00000000b - db 00100010b - db 00100010b - db 00100010b - db 00100110b - db 00011010b + db %00000000 + db %00000000 + db %00100010 + db %00100010 + db %00100010 + db %00100110 + db %00011010 diff --git a/libticalcs/trunk/src/romdump_8x/link.asm b/libticalcs/trunk/src/romdump_8x/link.asm index 81b316fea..f22743e13 100644 --- a/libticalcs/trunk/src/romdump_8x/link.asm +++ b/libticalcs/trunk/src/romdump_8x/link.asm @@ -43,12 +43,12 @@ LinkSendBC: ret z dec bc push bc - #ifdef TI83 + if defined TI83 in a, (linkPort) and 10h or LINK_RESET push af - #endif + endif ld a, (de) inc de ld c, a @@ -59,11 +59,11 @@ LinkSendBC: call LinkPutByte pop hl pop de - #ifdef TI83 + if defined TI83 pop bc ld c, linkPort out (c), b - #endif + endif pop bc ret c jr LinkSendBC @@ -85,12 +85,12 @@ LinkSendBC: ;; - AF, BC, DE LinkReceiveB: - #ifdef TI83 + if defined TI83 in a, (linkPort) and 10h or LINK_RESET ld c, a - #endif + endif LinkReceiveB_Loop: push bc push hl @@ -110,10 +110,10 @@ LinkReceiveB_Loop: push bc LinkReceiveB_Error: pop bc - #ifdef TI83 + if defined TI83 ld a, c out (linkPort), a - #endif + endif ret ;; LinkError: @@ -127,27 +127,27 @@ LinkReceiveB_Error: LinkError: ld b, 255 push af - #ifdef CALC_LINK_ASSIST + if defined CALC_LINK_ASSIST in a, (2) and 80h out (8), a - #endif - #ifdef TI83 + endif + if defined TI83 in a, (linkPort) and 10h or LINK_RESET - #else + else ld a, LINK_RESET - #endif + endif out (linkPort), a LinkDelay_Loop: ei halt halt djnz LinkDelay_Loop - #ifdef CALC_LINK_ASSIST + if defined CALC_LINK_ASSIST xor a out (8), a - #endif + endif pop af ret diff --git a/libticalcs/trunk/src/romdump_8x/link83p.asm b/libticalcs/trunk/src/romdump_8x/link83p.asm index b37be2232..c0c8f0838 100644 --- a/libticalcs/trunk/src/romdump_8x/link83p.asm +++ b/libticalcs/trunk/src/romdump_8x/link83p.asm @@ -37,11 +37,11 @@ CheckLinkActivity: cpl and 3 ret nz - #ifndef TI84PC + if ! defined TI84PC in a, (2) and 80h ret z - #endif + endif in a, (9) and 18h ret diff --git a/libticalcs/trunk/src/romdump_8x/linksw.asm b/libticalcs/trunk/src/romdump_8x/linksw.asm index 9d69512a8..8277a333d 100644 --- a/libticalcs/trunk/src/romdump_8x/linksw.asm +++ b/libticalcs/trunk/src/romdump_8x/linksw.asm @@ -23,17 +23,29 @@ BIT_TIMEOUT equ 65535 -#ifndef TI82 - -#define LD_A_LINK_D0L ld a, LINK_D0L -#define LD_A_LINK_D1L ld a, LINK_D1L -#define AND_LINK_STATUS_MASK and LINK_STATUS_MASK - -#else ; TI82 - -#define LD_A_LINK_D0L ld a, (linkD0L) -#define LD_A_LINK_D1L ld a, (linkD1L) -#define AND_LINK_STATUS_MASK call AndLinkStatusMask +if ! defined TI82 + +macro LD_A_LINK_D0L + ld a, LINK_D0L +endm +macro LD_A_LINK_D1L + ld a, LINK_D1L +endm +macro AND_LINK_STATUS_MASK + and LINK_STATUS_MASK +endm + +else ; TI82 + +macro LD_A_LINK_D0L + ld a, (linkD0L) +endm +macro LD_A_LINK_D1L + ld a, (linkD1L) +endm +macro AND_LINK_STATUS_MASK + call AndLinkStatusMask +endm LINK_STATUS_MASK equ 0 @@ -67,7 +79,7 @@ InitializeLink_Old: ld (linkD0L), hl ret -#endif ; TI82 +endif ; TI82 ;; CheckLinkActivity: ;; diff --git a/libticalcs/trunk/src/romdump_8x/main.asm b/libticalcs/trunk/src/romdump_8x/main.asm index d0efa711b..8615dc663 100644 --- a/libticalcs/trunk/src/romdump_8x/main.asm +++ b/libticalcs/trunk/src/romdump_8x/main.asm @@ -25,32 +25,32 @@ Main: res apdRunning, (iy + apdFlags) in a, (memPort) ld (defaultMemPage), a - #ifdef TI83 + if defined TI83 in a, (linkPort) and 10h or LINK_RESET ld (defaultLinkState), a - #endif - #ifdef TI84PC + endif + if defined TI84PC in a, (memExtPort) ld (defaultMemExt), a - #endif + endif - #ifdef TI82 + if defined TI82 call InitializeLink - #endif + endif - #ifdef CALC_USB + if defined CALC_USB call InitializeUSB - #endif + endif - #ifdef CALC_FLASH + if defined CALC_FLASH call Unlock ld a, (defaultMemPage) out (memPort), a - #endif + endif - #ifdef TI83P + if defined TI83P in a, (2) add a, a jr nc, Main_83PlusBE @@ -64,7 +64,7 @@ Main: Main_84PlusBE: ld (ROMSize + 2), a Main_83PlusBE: - #endif + endif ld hl, 0 ld (errorCount), hl @@ -148,14 +148,14 @@ Received_3: ld (curRow), hl ld hl, KString PUT_STRING - #ifdef TI83P + if defined TI83P ld hl, (ROMSize + 1) srl h srl h PUT_DECIMAL ld a, 'K' PUT_CHAR - #endif + endif MainLoop_: jr MainLoop @@ -171,9 +171,9 @@ Main_Error: inc hl ld (errorCount), hl PUT_DECIMAL - #ifndef USB + if ! defined USB call LinkError - #endif + endif MainLoop__: jr MainLoop_ @@ -220,14 +220,14 @@ BlockRequest_SetPacket: call SendPacket ;; Restore original memory page - #ifdef TI83 + if defined TI83 ld a, (defaultLinkState) out (linkPort), a - #endif - #ifdef TI84PC + endif + if defined TI84PC ld a,(defaultMemExt) out (memExtPort), a - #endif + endif ld a, (defaultMemPage) out (memPort), a diff --git a/libticalcs/trunk/src/romdump_8x/romdump.asm b/libticalcs/trunk/src/romdump_8x/romdump.asm index 0ad38b48a..5427a66a2 100644 --- a/libticalcs/trunk/src/romdump_8x/romdump.asm +++ b/libticalcs/trunk/src/romdump_8x/romdump.asm @@ -21,28 +21,28 @@ ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#define equ .equ -#define org .org -#define rorg .org -#define db .db -#define dw .dw +;;.define equ .equ +;.define org .org +;.define rorg .org +;.define db .db +;.define dw .dw -#include "romdump.inc" +include "romdump.inc" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-73 ;;; -#ifdef TI73 +if defined TI73 ;;; This program can be launched from the home screen. -#include "ti73defs.inc" +include "ti73defs.inc" -#define safe_mem appBackUpScreen -#define fixed_exec saveSScreen -#define fixed_size_limit 768 +safe_mem equ appBackUpScreen +fixed_exec equ saveSScreen +fixed_size_limit equ 768 ;; BASIC code to launch assembly stub db "_00001005?" @@ -58,26 +58,26 @@ start: ld bc, 3FD5h res remoteKeyPress, (iy + remoteKeyFlag) -#endif ; TI73 +endif ; TI73 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-82 ;;; -#ifdef TI82 +if defined TI82 ;;; This program is launched using a buffer overflow, which jumps ;;; directly to 'start', with HL equal to the address of 'start' and ;;; SP = (onSP). -#include "ti82defs.inc" +include "ti82defs.inc" -#define NEED_DISPLAY_ROUTINES +;#define NEED_DISPLAY_ROUTINES -#define safe_mem saveSScreen -#define fixed_exec (saveSScreen + 128) -#define fixed_size_limit 640 +safe_mem equ saveSScreen +fixed_exec equ (saveSScreen + 128) +fixed_size_limit equ 640 start: ld de, fixed_code - start @@ -112,7 +112,7 @@ start: xor (hl) inc hl xor (hl) - cp 3Eh ^ cxError ^ 0CDh + cp 3Eh xor cxError xor 0CDh jr nz, exit_error ld a, cxCmd jp (hl) @@ -129,22 +129,22 @@ exit_error: ld (errNo), a ret -#endif ; TI82 +endif ; TI82 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-83 / TI-82 STATS / TI-76.fr ;;; -#ifdef TI83 +if defined TI83 ;;; This program can be launched using the command "Send(9prgmROMDUMP". -#include "ti83defs.inc" +include "ti83defs.inc" -#define safe_mem saveSScreen -#define fixed_exec saveSScreen + 128 -#define fixed_size_limit 640 +safe_mem equ saveSScreen +fixed_exec equ saveSScreen + 128 +fixed_size_limit equ 640 db "CD2644" ; call _FindProgSym db "211900" ; ld hl, 25 @@ -160,20 +160,20 @@ start: ld bc, fixed_code_size ldir -#endif ; TI83 +endif ; TI83 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-83 Plus / TI-84 Plus ;;; -#ifdef TI83P +if defined TI83P ;;; This program can be launched using the command "Asm(prgmROMDUMP". -#include "ti83pdefs.inc" +include "ti83pdefs.inc" -#define safe_mem saveSScreen +safe_mem equ saveSScreen ;; Header for Asm( org 9d93h @@ -186,20 +186,20 @@ start: res remoteKeyPress, (iy + remoteKeyFlag) -#endif ; TI83P +endif ; TI83P ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-84 Plus C ;;; -#ifdef TI84PC +if defined TI84PC ;;; This program can be launched using the command "Asm(prgmROMDUMP". -#include "ti84pcdefs.inc" +include "ti84pcdefs.inc" -#define safe_mem saveSScreen +safe_mem equ saveSScreen ;; Header for Asm( org 0A609h @@ -211,26 +211,26 @@ start: res appTextSave, (iy + appFlags) res remoteKeyPress, (iy + remoteKeyFlag) -#endif ; TI84PC +endif ; TI84PC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-85 ;;; -#ifdef TI85 +if defined TI85 ;;; This program is launched using a buffer overflow, which jumps ;;; directly to 'start', with HL equal to the address of 'start' and ;;; SP = (onSP). -#include "ti85defs.inc" +include "ti85defs.inc" -#define NEED_DISPLAY_ROUTINES +;#define NEED_DISPLAY_ROUTINES -#define safe_mem plotSScreen -#define fixed_exec plotSScreen + 128 -#define fixed_size_limit 896 +safe_mem equ plotSScreen +fixed_exec equ plotSScreen + 128 +fixed_size_limit equ 896 start: ld de, fixed_code - start @@ -262,20 +262,20 @@ start: ld (errNo), a ret -#endif ; TI85 +endif ; TI85 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; TI-86 ;;; -#ifdef TI86 +if defined TI86 -#include "ti86defs.inc" +include "ti86defs.inc" ;;; This program can be launched using the command "Asm(ROMDump". -#define safe_mem 9000h +safe_mem equ 9000h ;; Header for Asm( org 0D746h @@ -283,71 +283,71 @@ start: res remoteKeyPress, (iy + remoteKeyFlag) -#endif ; TI86 +endif ; TI86 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Main program ;;; -#include "defs.inc" -#include "main.asm" +include "defs.inc" +include "main.asm" fixed_code: -#ifdef fixed_exec - rorg fixed_exec -#endif +if defined fixed_exec + org fixed_exec +endif CallHL: jp (hl) -#ifdef TI73 - #include "unlock73.asm" -#endif - -#ifdef TI83P - #include "unlock83p.asm" -#endif - -#include "packet.asm" - -#ifdef USB - #include "usb.asm" -#else - #include "link.asm" - #ifdef TI83P - #include "link83p.asm" - #else - #ifdef TI84PC - #include "link83p.asm" - #else - #include "linksw.asm" - #endif - #endif -#endif - -#ifdef NEED_DISPLAY_ROUTINES - #include "display.asm" - #ifdef TI82 - #include "display82.asm" - #else - #include "display85.asm" - #endif -#endif - -#include "data.asm" - -#ifdef fixed_exec +if defined TI73 + include "unlock73.asm" +endif + +if defined TI83P + include "unlock83p.asm" +endif + +include "packet.asm" + +if defined USB && USB != 0 + ;include "usb.asm" +else + include "link.asm" + if defined TI83P + include "link83p.asm" + else + if defined TI84PC + include "link83p.asm" + else + include "linksw.asm" + endif + endif +endif + +if defined NEED_DISPLAY_ROUTINES + include "display.asm" + if defined TI82 + include "display82.asm" + else + include "display85.asm" + endif +endif + +include "data.asm" + +if defined fixed_exec fixed_code_size equ $ - fixed_exec - #if (fixed_code_size > fixed_size_limit) - #error "Fixed code section too large" - #endif -#endif + if (fixed_code_size > fixed_size_limit) + error "Fixed code section too large" + endif +endif -#ifdef NEED_DISPLAY_ROUTINES - #include "font.asm" -#endif +if defined NEED_DISPLAY_ROUTINES + include "font.asm" +endif -#ifdef TI83 +if defined TI83 db 0D4h, "?0000?", 0D4h -#endif +endif diff --git a/libticalcs/trunk/src/romdump_8x/romdump.inc b/libticalcs/trunk/src/romdump_8x/romdump.inc index 01efc676e..45e4e20b5 100644 --- a/libticalcs/trunk/src/romdump_8x/romdump.inc +++ b/libticalcs/trunk/src/romdump_8x/romdump.inc @@ -21,15 +21,15 @@ ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -CMD_PING .equ 0AA55h -CMD_NOK .equ 0 -CMD_OK .equ 1 -CMD_EOT .equ 2 -CMD_SIZE .equ 3 -CMD_RETRY .equ 4 -CMD_REQ .equ 5 -CMD_DATA .equ 6 -CMD_REPEAT .equ 7 +CMD_PING equ 0AA55h +CMD_NOK equ 0 +CMD_OK equ 1 +CMD_EOT equ 2 +CMD_SIZE equ 3 +CMD_RETRY equ 4 +CMD_REQ equ 5 +CMD_DATA equ 6 +CMD_REPEAT equ 7 -BLOCK_SIZE .equ 1024 -TIMEOUT .equ 65535 +BLOCK_SIZE equ 1024 +TIMEOUT equ 65535 diff --git a/libticalcs/trunk/src/romdump_8x/ti73defs.inc b/libticalcs/trunk/src/romdump_8x/ti73defs.inc index e9f41d938..2776292ab 100644 --- a/libticalcs/trunk/src/romdump_8x/ti73defs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti73defs.inc @@ -63,19 +63,37 @@ _RunIndicOff equ 44D7h ;;; Macros -.addinstr B_CALL * EF 3 NOP 1 - -#define CLEAR_LCD B_CALL _ClrScrnFull -#define GET_CSC B_CALL _GetCSC -#define PUT_CHAR B_CALL _PutC -#define PUT_DECIMAL B_CALL _DispHL -#define PUT_STRING B_CALL _PutS -#define RUN_INDIC_OFF B_CALL _RunIndicOff -#define SET_ROM_PAGE out (memPort), a - -#define EXIT_KEY_STR db 0C1h, "MODE]" +macro B_CALL, arg + db 0EFh + dw arg +endm + +macro CLEAR_LCD + B_CALL _ClrScrnFull +endm +macro GET_CSC + B_CALL _GetCSC +endm +macro PUT_CHAR + B_CALL _PutC +endm +macro PUT_DECIMAL + B_CALL _DispHL +endm +macro PUT_STRING + B_CALL _PutS +endm +macro RUN_INDIC_OFF + B_CALL _RunIndicOff +endm +macro SET_ROM_PAGE + out (memPort), a +endm + +macro EXIT_KEY_STR + db 0C1h, "MODE]" +endm ;;; Miscellaneous -#define CALC_FLASH -#define CALC_ROM_SIZE 512 +CALC_ROM_SIZE equ 512 diff --git a/libticalcs/trunk/src/romdump_8x/ti82defs.inc b/libticalcs/trunk/src/romdump_8x/ti82defs.inc index d478e2be9..93132a831 100644 --- a/libticalcs/trunk/src/romdump_8x/ti82defs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti82defs.inc @@ -58,17 +58,38 @@ cxError equ 52h ;;; Macros -#define CLEAR_LCD call ClearLCD -#define PUT_CHAR call PutC -#define PUT_DECIMAL call DispHL -#define PUT_STRING call PutS - -#define GET_CSC di \ ld hl, kbdScanCode \ ld a, (hl) \ ld (hl), 0 -#define RUN_INDIC_OFF res indicRun, (iy + indicFlags) -#define SET_ROM_PAGE and 7 \ or 88h \ out (memPort), a - -#define EXIT_KEY_STR db "[MODE]" +macro CLEAR_LCD + call ClearLCD +endm +macro PUT_CHAR + call PutC +endm +macro PUT_DECIMAL + call DispHL +endm +macro PUT_STRING + call PutS +endm + +macro GET_CSC + di + ld hl, kbdScanCode + ld a, (hl) + ld (hl), 0 +endm +macro RUN_INDIC_OFF + res indicRun, (iy + indicFlags) +endm +macro SET_ROM_PAGE + and 7 + or 88h + out (memPort), a +endm + +macro EXIT_KEY_STR + db "[MODE]" +endm ;;; Miscellaneous -#define CALC_ROM_SIZE 128 +CALC_ROM_SIZE equ 128 diff --git a/libticalcs/trunk/src/romdump_8x/ti83defs.inc b/libticalcs/trunk/src/romdump_8x/ti83defs.inc index 765430d5a..315cbf8f4 100644 --- a/libticalcs/trunk/src/romdump_8x/ti83defs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti83defs.inc @@ -55,17 +55,41 @@ _RunIndicOff equ 4795h ;;; Macros -#define CLEAR_LCD call _ClrScrnFull -#define GET_CSC call _GetCSC -#define PUT_CHAR call _PutC -#define PUT_DECIMAL call _DispHL -#define PUT_STRING call _PutS -#define RUN_INDIC_OFF call _RunIndicOff - -#define SET_ROM_PAGE push af \ and 8 \ rlca \ or LINK_RESET \ out (linkPort), a \ pop af \ and 7 \ or 88h \ out (2), a - -#define EXIT_KEY_STR db 0C1h, "MODE]" +macro CLEAR_LCD + call _ClrScrnFull +endm +macro GET_CSC + call _GetCSC +endm +macro PUT_CHAR + call _PutC +endm +macro PUT_DECIMAL + call _DispHL +endm +macro PUT_STRING + call _PutS +endm +macro RUN_INDIC_OFF + call _RunIndicOff +endm + +macro SET_ROM_PAGE + push af + and 8 + rlca + or LINK_RESET + out (linkPort), a + pop af + and 7 + or 88h + out (2), a +endm + +macro EXIT_KEY_STR + db 0C1h, "MODE]" +endm ;;; Miscellaneous -#define CALC_ROM_SIZE 256 +CALC_ROM_SIZE equ 256 diff --git a/libticalcs/trunk/src/romdump_8x/ti83pdefs.inc b/libticalcs/trunk/src/romdump_8x/ti83pdefs.inc index b41a074b3..a37645814 100644 --- a/libticalcs/trunk/src/romdump_8x/ti83pdefs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti83pdefs.inc @@ -75,20 +75,37 @@ _WriteAByteSafe equ 80C6h ;;; Macros -.addinstr B_CALL * EF 3 NOP 1 - -#define CLEAR_LCD B_CALL _ClrScrnFull -#define GET_CSC B_CALL _GetCSC -#define PUT_CHAR B_CALL _PutC -#define PUT_DECIMAL B_CALL _DispHL -#define PUT_STRING B_CALL _PutS -#define RUN_INDIC_OFF B_CALL _RunIndicOff -#define SET_ROM_PAGE out (memPort), a - -#define EXIT_KEY_STR db 0C1h, "MODE]" +macro B_CALL, arg + db 0EFh + dw arg +endm + +macro CLEAR_LCD + B_CALL _ClrScrnFull +endm +macro GET_CSC + B_CALL _GetCSC +endm +macro PUT_CHAR + B_CALL _PutC +endm +macro PUT_DECIMAL + B_CALL _DispHL +endm +macro PUT_STRING + B_CALL _PutS +endm +macro RUN_INDIC_OFF + B_CALL _RunIndicOff +endm +macro SET_ROM_PAGE + out (memPort), a +endm + +macro EXIT_KEY_STR + db 0C1h, "MODE]" +endm ;;; Miscellaneous -#define CALC_FLASH -#define CALC_LINK_ASSIST -#define CALC_ROM_SIZE 0 +CALC_ROM_SIZE equ 0 diff --git a/libticalcs/trunk/src/romdump_8x/ti84pcdefs.inc b/libticalcs/trunk/src/romdump_8x/ti84pcdefs.inc index e700a6f22..dee87ce93 100644 --- a/libticalcs/trunk/src/romdump_8x/ti84pcdefs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti84pcdefs.inc @@ -66,19 +66,40 @@ _SendAByte equ 4ECAh ;;; Macros -.addinstr B_CALL * EF 3 NOP 1 - -#define CLEAR_LCD B_CALL _ClrScrnFull -#define GET_CSC B_CALL _GetCSC -#define PUT_CHAR B_CALL _PutC -#define PUT_DECIMAL B_CALL _DispHL -#define PUT_STRING B_CALL _PutS -#define RUN_INDIC_OFF B_CALL _RunIndicOff -#define SET_ROM_PAGE rlca \ out (memExtPort), a \ srl a \ out (memPort), a - -#define EXIT_KEY_STR db 0C1h, "MODE]" +macro B_CALL, arg + db 0EFh + dw arg +endm + +macro CLEAR_LCD + B_CALL _ClrScrnFull +endm +macro GET_CSC + B_CALL _GetCSC +endm +macro PUT_CHAR + B_CALL _PutC +endm +macro PUT_DECIMAL + B_CALL _DispHL +endm +macro PUT_STRING + B_CALL _PutS +endm +macro RUN_INDIC_OFF + B_CALL _RunIndicOff +endm +macro SET_ROM_PAGE + rlca + out (memExtPort), a + srl a + out (memPort), a +endm + +macro EXIT_KEY_STR + db 0C1h, "MODE]" +endm ;;; Miscellaneous -#define CALC_LINK_ASSIST -#define CALC_ROM_SIZE 4096 +CALC_ROM_SIZE equ 4096 diff --git a/libticalcs/trunk/src/romdump_8x/ti85defs.inc b/libticalcs/trunk/src/romdump_8x/ti85defs.inc index 753eaf94c..6743068cb 100644 --- a/libticalcs/trunk/src/romdump_8x/ti85defs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti85defs.inc @@ -56,17 +56,36 @@ indicRun equ 0 ;;; Macros -#define CLEAR_LCD call ClearLCD -#define PUT_CHAR call PutC -#define PUT_DECIMAL call DispHL -#define PUT_STRING call PutS - -#define GET_CSC di \ ld hl, kbdScanCode \ ld a, (hl) \ ld (hl), 0 -#define RUN_INDIC_OFF res indicRun, (iy + indicFlags) -#define SET_ROM_PAGE out (memPort), a - -#define EXIT_KEY_STR db "[EXIT]" +macro CLEAR_LCD + call ClearLCD +endm +macro PUT_CHAR + call PutC +endm +macro PUT_DECIMAL + call DispHL +endm +macro PUT_STRING + call PutS +endm + +macro GET_CSC + di + ld hl, kbdScanCode + ld a, (hl) + ld (hl), 0 +endm +macro RUN_INDIC_OFF + res indicRun, (iy + indicFlags) +endm +macro SET_ROM_PAGE + out (memPort), a +endm + +macro EXIT_KEY_STR + db "[EXIT]" +endm ;;; Miscellaneous -#define CALC_ROM_SIZE 128 +CALC_ROM_SIZE equ 128 diff --git a/libticalcs/trunk/src/romdump_8x/ti86defs.inc b/libticalcs/trunk/src/romdump_8x/ti86defs.inc index 247a7f556..b64d585fe 100644 --- a/libticalcs/trunk/src/romdump_8x/ti86defs.inc +++ b/libticalcs/trunk/src/romdump_8x/ti86defs.inc @@ -57,18 +57,35 @@ _runindicoff equ 4AB1h ;;; Macros -#define CLEAR_LCD call _clrScrn -#define GET_CSC call _get_key -#define PUT_CHAR call _putc -#define PUT_DECIMAL xor a \ call _dispAHL -#define PUT_STRING call _puts -#define RUN_INDIC_OFF call _runindicoff - -#define SET_ROM_PAGE out (memPort), a - -#define EXIT_KEY_STR db "[EXIT]" +macro CLEAR_LCD + call _clrScrn +endm +macro GET_CSC + call _get_key +endm +macro PUT_CHAR + call _putc +endm +macro PUT_DECIMAL + xor a + call _dispAHL +endm +macro PUT_STRING + call _puts +endm +macro RUN_INDIC_OFF + call _runindicoff +endm + +macro SET_ROM_PAGE + out (memPort), a +endm + +macro EXIT_KEY_STR + db "[EXIT]" +endm ;;; Miscellaneous -#define CALC_ROM_SIZE 256 +CALC_ROM_SIZE equ 256