diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index 56f627d..8c4ec0e 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 c92a75b..21a184c 100644 --- a/forth/forth.asm +++ b/forth/forth.asm @@ -128,6 +128,7 @@ LIT: .dw RS_ADDR .dw CINPTR .dw SYSVNXT + .dw FLAGS ; *** Code *** forthMain: @@ -164,7 +165,7 @@ forthMain: .bootName: .db "BOOT", 0 -.fill 91 +.fill 89 ; STABLE ABI ; Offset: 00cd @@ -820,17 +821,10 @@ PARSEPTR_: .dw sysvarWord .dw PARSEPTR - .db "FLAGS" - .dw $-PARSEPTR_ - .db 5 -FLAGS_: - .dw sysvarWord - .dw FLAGS - -.fill 65 +.fill 77 .db "_bend" - .dw $-FLAGS_ + .dw $-PARSEPTR_ .db 5 ; Offset: 0647 .out $ diff --git a/forth/icore.fs b/forth/icore.fs index bfc7c76..51c0d5c 100644 --- a/forth/icore.fs +++ b/forth/icore.fs @@ -55,8 +55,13 @@ , ( write! ) ; IMMEDIATE +: FLAGS + ( JTBL+44 == FLAGS ) + [ JTBL 44 + @ LITN ] +; + : QUIT - 0 FLAGS _c ! _c (resRS) + 0 _c FLAGS _c ! _c (resRS) LIT< INTERPRET (find) _c DROP EXECUTE ; @@ -145,9 +150,9 @@ _c WORD (find) IF - 1 FLAGS _c ! + 1 _c FLAGS _c ! EXECUTE - 0 FLAGS _c ! + 0 _c FLAGS _c ! ELSE (parse*) _c @ EXECUTE THEN