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
|
jp EXIT+2
|
||||||
|
|
||||||
|
|
||||||
.fill 23
|
.fill 51
|
||||||
|
|
||||||
.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
|
|
||||||
|
|
||||||
; ( n -- )
|
; ( n -- )
|
||||||
.db "LITN"
|
.db "LITN"
|
||||||
.dw $-ISIMMED
|
.dw $-DOES
|
||||||
.db 4
|
.db 4
|
||||||
LITN:
|
LITN:
|
||||||
.dw nativeWord
|
.dw nativeWord
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
WORD
|
WORD
|
||||||
(find)
|
(find)
|
||||||
( is word )
|
( is word )
|
||||||
IF DUP IMMED? IF EXECUTE ELSE , THEN
|
IF DUP _c IMMED? IF EXECUTE ELSE , THEN
|
||||||
( maybe number )
|
( maybe number )
|
||||||
ELSE (parse*) @ EXECUTE LITN THEN
|
ELSE (parse*) @ EXECUTE LITN THEN
|
||||||
AGAIN
|
AGAIN
|
||||||
|
@ -233,3 +233,15 @@ CODE IMMEDIATE
|
|||||||
HL DECss,
|
HL DECss,
|
||||||
7 (HL) SETbr,
|
7 (HL) SETbr,
|
||||||
;CODE
|
;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