mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 05:08:05 +11:00
forth: Forth-ify "IMMED?"
This commit is contained in:
parent
8f990ff954
commit
408d93bd23
Binary file not shown.
@ -781,27 +781,11 @@ DOES:
|
||||
jp EXIT+2
|
||||
|
||||
|
||||
.fill 23
|
||||
|
||||
.db "IMMED?"
|
||||
.dw $-DOES
|
||||
.db 6
|
||||
ISIMMED:
|
||||
.dw nativeWord
|
||||
pop hl
|
||||
call chkPS
|
||||
dec hl
|
||||
ld de, 0
|
||||
bit FLAG_IMMED, (hl)
|
||||
jr z, .notset
|
||||
inc de
|
||||
.notset:
|
||||
push de
|
||||
jp next
|
||||
.fill 51
|
||||
|
||||
; ( n -- )
|
||||
.db "LITN"
|
||||
.dw $-ISIMMED
|
||||
.dw $-DOES
|
||||
.db 4
|
||||
LITN:
|
||||
.dw nativeWord
|
||||
|
@ -113,7 +113,7 @@
|
||||
WORD
|
||||
(find)
|
||||
( is word )
|
||||
IF DUP IMMED? IF EXECUTE ELSE , THEN
|
||||
IF DUP _c IMMED? IF EXECUTE ELSE , THEN
|
||||
( maybe number )
|
||||
ELSE (parse*) @ EXECUTE LITN THEN
|
||||
AGAIN
|
||||
|
@ -233,3 +233,15 @@ CODE IMMEDIATE
|
||||
HL DECss,
|
||||
7 (HL) SETbr,
|
||||
;CODE
|
||||
|
||||
CODE IMMED?
|
||||
HL POPqq,
|
||||
chkPS,
|
||||
HL DECss,
|
||||
DE 0 LDddnn,
|
||||
7 (HL) BITbr,
|
||||
3 JRZe, ( notset )
|
||||
DE INCss,
|
||||
( notset )
|
||||
DE PUSHqq,
|
||||
;CODE
|
||||
|
Loading…
Reference in New Issue
Block a user