Another 200 bytes. Need to think harder about what RST to ultimately use to
avoid mucking up CP/M emulator, and would be good to keep it a common value
so most platform userspace can also use the same hook
#export TARGET = coco2
#export TARGET = coco3
#export TARGET = dragon-nx32
-#export TARGET = micropack
+export TARGET = micropack
#export TARGET = msx1
#export TARGET = msx2
#export TARGET = mtx
#export TARGET = px4plus
#export TARGET = socz80
#export TARGET = tgl6502
-export TARGET = trs80
+#export TARGET = trs80
#export TARGET = ubee
#export TARGET = z80pack
#export TARGET = z80pack-lite
export VERSION = "0.1"
export SUBVERSION = "ac1"
+export ROOT_DIR
ifeq ($(MAKE),)
export MAKE = "make"
--- /dev/null
+;
+; Convert the function preambles calls into RST8
+;
+replace restart {
+ call ___sdcc_enter_ix
+} by {
+ rst 8
+}
+
+
--- /dev/null
+#
+# Use RST8 for call preamble
+#
+CROSS_CCOPTS += --peep-file $(ROOT_DIR)/cpu-z80/rst8.peep
+
.globl outchar
; imported symbols
+
+ .globl ___sdcc_enter_ix
.globl _ramsize
.globl _procmem
ld hl, #interrupt_handler
ld (0x0039), hl
+ ; RST8 helper
+ ld a, #0xC3 ; JP instruction
+ ld (0x008), a
+ ld hl, #___sdcc_enter_ix
+
+ ld (0x009), hl
+
; set restart vector for UZI system calls
ld (0x0030), a ; (rst 30h is unix function call vector)
ld hl, #unix_syscall_entry