recipes/sms/romasm: adjust ed/zasm offsets

This commit is contained in:
Virgil Dupras 2019-07-22 10:10:42 -04:00
parent 0237ff105f
commit 87d794d426
3 changed files with 12 additions and 10 deletions

View File

@ -2,8 +2,8 @@ ZASM = ../../../tools/zasm.sh
KERNEL = ../../../kernel KERNEL = ../../../kernel
APPS = ../../../apps APPS = ../../../apps
.PHONY: all .PHONY: all clean
all: os.sms ed.bin all: os.sms
ed.bin: $(APPS)/ed/glue.asm ed.bin: $(APPS)/ed/glue.asm
echo ".equ USER_CODE ED_CODE" | cat user-tmpl.h - > user.h 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 os.sms: glue.asm ed.bin zasm.bin
$(ZASM) $(KERNEL) ed.bin zasm.bin < $< > $@ $(ZASM) $(KERNEL) ed.bin zasm.bin < $< > $@
clean:
rm -f os.sms ed.bin zasm.bin

View File

@ -127,22 +127,22 @@ edCmd:
push hl \ pop ix push hl \ pop ix
ld l, (ix) ld l, (ix)
ld h, (ix+1) ld h, (ix+1)
jp 0x1800 jp 0x1900
zasmCmd: zasmCmd:
.db "zasm", 0b1001, 0, 0 .db "zasm", 0b1001, 0, 0
push hl \ pop ix push hl \ pop ix
ld l, (ix) ld l, (ix)
ld h, (ix+1) 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. ; for the start of ed.
.fill 0x1800-$ .fill 0x1900-$
.bin "ed.bin" .bin "ed.bin"
; Last check: 0x1b4e ; Last check: 0x1c4e
.fill 0x1c00-$ .fill 0x1d00-$
.bin "zasm.bin" .bin "zasm.bin"
.fill 0x7ff0-$ .fill 0x7ff0-$

View File

@ -1,6 +1,6 @@
; USER_CODE is filled in on-the-fly with either ED_CODE or ZASM_CODE ; USER_CODE is filled in on-the-fly with either ED_CODE or ZASM_CODE
.equ ED_CODE 0x1800 .equ ED_CODE 0x1900
.equ ZASM_CODE 0x1c00 .equ ZASM_CODE 0x1d00
.equ USER_RAMSTART 0xc200 .equ USER_RAMSTART 0xc200
.equ FS_HANDLE_SIZE 6 .equ FS_HANDLE_SIZE 6
.equ BLOCKDEV_SIZE 8 .equ BLOCKDEV_SIZE 8