From 0b5171c103423e053619a0be0e8e21d4cb0f6875 Mon Sep 17 00:00:00 2001 From: Alexandre Dumont Date: Sat, 22 Jan 2022 21:45:16 +0100 Subject: [PATCH] Forth: Add @ ! , shortcuts in FIND --- forth.s | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/forth.s b/forth.s index b920c13..1d3b2d3 100644 --- a/forth.s +++ b/forth.s @@ -1512,6 +1512,33 @@ defword "FIND",, STA 5,X JMP do_DROP @not_semi: + CMP #'@' + BNE @not_fetch + ; word is "@" + LDA #h_FETCH + STA 5,X + JMP do_DROP +@not_fetch: + CMP #'!' + BNE @not_store + ; word is "!" + LDA #h_STORE + STA 5,X + JMP do_DROP +@not_store: + CMP #',' + BNE @not_comma + ; word is "," + LDA #h_COMMA + STA 5,X + JMP do_DROP +@not_comma: @nxt_word: ; store W+2 in G1 (G1 points to the counted str) CLC