mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 17:38:05 +11:00
forth: add word 'ABORT"'
This commit is contained in:
parent
25b6e75cf7
commit
3a70dff53d
@ -165,9 +165,28 @@ abortUnderflow:
|
||||
.msg:
|
||||
.db "stack underflow", 0
|
||||
|
||||
.db "ABORT", '"'
|
||||
.fill 1
|
||||
.dw ABORT
|
||||
.db 1 ; IMMEDIATE
|
||||
ABORTI:
|
||||
.dw compiledWord
|
||||
.dw PRINTI
|
||||
.dw .private
|
||||
.dw EXIT
|
||||
|
||||
.db 0b10 ; UNWORD
|
||||
.private:
|
||||
.dw nativeWord
|
||||
ld hl, (HERE)
|
||||
ld de, ABORT
|
||||
call DEinHL
|
||||
ld (HERE), hl
|
||||
jp next
|
||||
|
||||
.db "BYE"
|
||||
.fill 4
|
||||
.dw ABORT
|
||||
.dw ABORTI
|
||||
.db 0
|
||||
BYE:
|
||||
.dw nativeWord
|
||||
|
@ -73,6 +73,8 @@ input stream is executed immediately. In this context, branching doesn't work.
|
||||
atom's cell.
|
||||
(bbr) -- Branches backward by the number specified in its
|
||||
atom's cell.
|
||||
ABORT -- Resets PS and RS and returns to interpreter
|
||||
ABORT" x" -- *I* Compiles a ." followed by a ABORT.
|
||||
AGAIN I:a -- *I* Jump backwards to preceeding BEGIN.
|
||||
BEGIN -- I:a *I* Marker for backward branching with AGAIN.
|
||||
ELSE I:a -- *I* Compiles a (fbr) and set branching cell at a.
|
||||
|
Loading…
Reference in New Issue
Block a user