forth: make forth/forth.asm spit whole binary

emul/forth/stage{0,1}.asm now only configure constants and append
binaries.
This commit is contained in:
Virgil Dupras 2020-03-26 12:17:02 -04:00
parent 966f6df0c5
commit cf2f6703bb
4 changed files with 3 additions and 18 deletions

View File

@ -1,5 +1,3 @@
jp init
.inc "stagec.asm" .inc "stagec.asm"
.inc "forth.asm" .inc "forth.asm"

View File

@ -1,5 +1,3 @@
jp init
.inc "stagec.asm" .inc "stagec.asm"
.inc "forth.asm" .inc "forth.asm"

View File

@ -2,10 +2,3 @@
.equ HERE_INITIAL CODE_END ; override .equ HERE_INITIAL CODE_END ; override
.equ LATEST CODE_END ; override .equ LATEST CODE_END ; override
.equ STDIO_PORT 0x00 .equ STDIO_PORT 0x00
init:
di
; setup stack
ld sp, 0xffff
call forthMain
halt

View File

@ -103,6 +103,8 @@
; *** Stable ABI *** ; *** Stable ABI ***
; Those jumps below are supposed to stay at these offsets, always. If they ; Those jumps below are supposed to stay at these offsets, always. If they
; change bootstrap binaries have to be adjusted because they rely on them. ; change bootstrap binaries have to be adjusted because they rely on them.
; We're at 0 here
jp forthMain
.fill 0x17-$ .fill 0x17-$
JUMPTBL: JUMPTBL:
jp nativeWord jp nativeWord
@ -683,13 +685,7 @@ abortUnderflow:
.db 3 .db 3
BYE: BYE:
.dw nativeWord .dw nativeWord
; Goodbye Forth! Before we go, let's restore the stack halt
ld sp, (INITIAL_SP)
; unwind stack underflow buffer
pop af \ pop af \ pop af
; success
xor a
ret
; ( c -- ) ; ( c -- )
.db "EMIT" .db "EMIT"