diff --git a/recipes/sms/romasm/Makefile b/recipes/sms/romasm/Makefile index 8be033e..131d8f7 100644 --- a/recipes/sms/romasm/Makefile +++ b/recipes/sms/romasm/Makefile @@ -2,8 +2,8 @@ ZASM = ../../../tools/zasm.sh KERNEL = ../../../kernel APPS = ../../../apps -.PHONY: all -all: os.sms ed.bin +.PHONY: all clean +all: os.sms ed.bin: $(APPS)/ed/glue.asm echo ".equ USER_CODE ED_CODE" | cat user-tmpl.h - > user.h @@ -16,3 +16,5 @@ zasm.bin: $(APPS)/zasm/glue.asm os.sms: glue.asm ed.bin zasm.bin $(ZASM) $(KERNEL) ed.bin zasm.bin < $< > $@ +clean: + rm -f os.sms ed.bin zasm.bin diff --git a/recipes/sms/romasm/glue.asm b/recipes/sms/romasm/glue.asm index 0671511..8d5c2bd 100644 --- a/recipes/sms/romasm/glue.asm +++ b/recipes/sms/romasm/glue.asm @@ -127,22 +127,22 @@ edCmd: push hl \ pop ix ld l, (ix) ld h, (ix+1) - jp 0x1800 + jp 0x1900 zasmCmd: .db "zasm", 0b1001, 0, 0 push hl \ pop ix ld l, (ix) ld h, (ix+1) - jp 0x1c00 + jp 0x1d00 -; last time I checked, PC at this point was 0x175a. Let's give us a nice margin +; last time I checked, PC at this point was 0x183c. Let's give us a nice margin ; for the start of ed. -.fill 0x1800-$ +.fill 0x1900-$ .bin "ed.bin" -; Last check: 0x1b4e -.fill 0x1c00-$ +; Last check: 0x1c4e +.fill 0x1d00-$ .bin "zasm.bin" .fill 0x7ff0-$ diff --git a/recipes/sms/romasm/user-tmpl.h b/recipes/sms/romasm/user-tmpl.h index 1f9e8fa..cbcfd20 100644 --- a/recipes/sms/romasm/user-tmpl.h +++ b/recipes/sms/romasm/user-tmpl.h @@ -1,6 +1,6 @@ ; USER_CODE is filled in on-the-fly with either ED_CODE or ZASM_CODE -.equ ED_CODE 0x1800 -.equ ZASM_CODE 0x1c00 +.equ ED_CODE 0x1900 +.equ ZASM_CODE 0x1d00 .equ USER_RAMSTART 0xc200 .equ FS_HANDLE_SIZE 6 .equ BLOCKDEV_SIZE 8