diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index e7cf673..85d8145 100644 Binary files a/emul/forth/z80c.bin and b/emul/forth/z80c.bin differ diff --git a/forth/forth.asm b/forth/forth.asm index 94dcadc..59ff6a4 100644 --- a/forth/forth.asm +++ b/forth/forth.asm @@ -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 diff --git a/forth/icore.fs b/forth/icore.fs index da046f2..be1fa54 100644 --- a/forth/icore.fs +++ b/forth/icore.fs @@ -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 diff --git a/forth/z80c.fs b/forth/z80c.fs index 4af00e3..4610308 100644 --- a/forth/z80c.fs +++ b/forth/z80c.fs @@ -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