commit 3bf22fdee12a045a12f624b2518cefa593a2e897 parent 217130d581612aaf8cb26562749cffd250ef16dc Author: Henry Wilson <m3henry@googlemail.com> Date: Sun, 30 Jul 2017 15:39:47 +0100 added compiler entry/exit words Diffstat:
M | macros.i | | | 2 | +- |
M | main.s | | | 24 | ++++++++++++++++++++++-- |
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/macros.i b/macros.i @@ -105,7 +105,7 @@ .else 7: strlit "\name\()" .endif -.ifnb \immediate +.ifb \immediate .quad -1 .else .quad 0 diff --git a/main.s b/main.s @@ -123,9 +123,19 @@ verb forth INTERPRET do CR do ABORT goto 2f - 1: const 8 + 1: do DUP + const 8 do plus - do EXECUTE + do SWAP + do fetch + get MODE + do AND + if 1f + do EXECUTE + goto 2f + 1: say "!" + do dot + saycr "!" 2: get numin get numtib do less @@ -236,6 +246,16 @@ verb forth FIND do FALSE endword +# Compiler + +verb forth modeI "[" immediate + set MODE 0 + endword + +verb forth modeC "]" + set MODE -1 + endword + # User Words verb forth greet GREET