diff --git a/blk/043 b/blk/043 index e4c6099..60f3f7c 100644 --- a/blk/043 +++ b/blk/043 @@ -12,4 +12,5 @@ have to consume it to avoid PSP leak. ] -- End interpretative mode. ABORT -- Resets PS and RS and returns to interpreter. ABORT" x" -- *I* Compiles a ." followed by a ABORT. -EXECUTE a -- Execute wordref at addr a +ERR a -- Prints a and ABORT. Defined early and used by + drivers. (cont.) diff --git a/blk/044 b/blk/044 index f15cb2f..ae2cdc6 100644 --- a/blk/044 +++ b/blk/044 @@ -1,3 +1,4 @@ +EXECUTE a -- Execute wordref at addr a INTERPRET -- Get a line from stdin, compile it in tmp memory, then execute the compiled contents. LEAVE -- In a DO..LOOP, exit at the next LOOP call. diff --git a/blk/394 b/blk/394 index 6fb571f..d6742b5 100644 --- a/blk/394 +++ b/blk/394 @@ -1,4 +1,5 @@ : ABORT (resSP) QUIT ; +: ERR LIT< (print) (find) IF EXECUTE THEN ABORT ; : = CMP NOT ; : < CMP -1 = ; : > CMP 1 = ; : 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ; ( n l h -- f ) diff --git a/blk/421 b/blk/421 index f73d4ed..3c7e85b 100644 --- a/blk/421 +++ b/blk/421 @@ -12,5 +12,5 @@ : CRLF CR LF ; : SPC 32 EMIT ; : NL 0x0a RAM+ @ ( NLPTR ) DUP IF EXECUTE ELSE DROP CRLF THEN ; : (ok) SPC LIT" ok" (print) NL ; -: (uflw) LIT" stack underflow" (print) ABORT ; -: (wnf) (print) SPC LIT" word not found" (print) ABORT ; +: (uflw) LIT" stack underflow" ERR ; +: (wnf) (print) SPC LIT" word not found" ERR ; diff --git a/emul/forth.bin b/emul/forth.bin index 1f56f0a..d88b416 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ