mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-04 04:48:06 +11:00
forth: Forth-ify "QUIT"
This commit is contained in:
parent
da9f9f9899
commit
f6cba4b1cf
Binary file not shown.
@ -123,7 +123,9 @@ LIT:
|
||||
.dw INITIAL_SP
|
||||
.dw WORDBUF
|
||||
jp flagsToBC
|
||||
; 35
|
||||
jp strcmp
|
||||
.dw RS_ADDR
|
||||
|
||||
; *** Code ***
|
||||
forthMain:
|
||||
@ -174,15 +176,7 @@ forthMain:
|
||||
.bootName:
|
||||
.db "BOOT", 0
|
||||
|
||||
INTERPRET:
|
||||
.dw compiledWord
|
||||
.dw LIT
|
||||
.db "INTERPRET", 0
|
||||
.dw FIND_
|
||||
.dw DROP
|
||||
.dw EXECUTE
|
||||
|
||||
.fill 50
|
||||
.fill 68
|
||||
|
||||
; STABLE ABI
|
||||
; Offset: 00cd
|
||||
@ -632,23 +626,7 @@ EXIT:
|
||||
call popRSIP
|
||||
jp next
|
||||
|
||||
; ( R:I -- )
|
||||
.db "QUIT"
|
||||
.dw $-EXIT
|
||||
.db 4
|
||||
QUIT:
|
||||
.dw compiledWord
|
||||
.dw NUMBER
|
||||
.dw 0
|
||||
.dw FLAGS_
|
||||
.dw STORE
|
||||
.dw .private
|
||||
.dw INTERPRET
|
||||
|
||||
.private:
|
||||
.dw nativeWord
|
||||
ld ix, RS_ADDR
|
||||
jp next
|
||||
.fill 30
|
||||
|
||||
abortUnderflow:
|
||||
ld hl, .name
|
||||
@ -659,7 +637,7 @@ abortUnderflow:
|
||||
.db "(uflw)", 0
|
||||
|
||||
.db "(br)"
|
||||
.dw $-QUIT
|
||||
.dw $-EXIT
|
||||
.db 4
|
||||
BR:
|
||||
.dw nativeWord
|
||||
|
@ -49,7 +49,9 @@
|
||||
, ( write! )
|
||||
; IMMEDIATE
|
||||
|
||||
: ABORT _c (resSP) QUIT ;
|
||||
: QUIT 0 FLAGS ! _c (resRS) LIT< INTERPRET (find) DROP EXECUTE ;
|
||||
|
||||
: ABORT _c (resSP) _c QUIT ;
|
||||
|
||||
( This is only the "early parser" in earlier stages. No need
|
||||
for an abort message )
|
||||
|
@ -290,6 +290,11 @@ CODE (resSP)
|
||||
SP JTBL 28 + @ LDdd(nn),
|
||||
;CODE
|
||||
|
||||
CODE (resRS)
|
||||
( RS_ADDR == JTBL+38 )
|
||||
IX JTBL 38 + @ LDddnn,
|
||||
;CODE
|
||||
|
||||
CODE SCMP
|
||||
DE POPqq,
|
||||
HL POPqq,
|
||||
|
Loading…
Reference in New Issue
Block a user