From 1c519e51f8759c6ddaceb34694a75b856cabc3aa Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Thu, 31 Dec 2020 15:10:54 +0900 Subject: [PATCH] Change semantics of "F" and add "G" --- core.fs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core.fs b/core.fs index 2371cac..f37365e 100644 --- a/core.fs +++ b/core.fs @@ -277,7 +277,7 @@ i, \ 'F' ( c-addr u -- w ) \ Lookup multi-character word from dictionary. -\ Return CFA of the word if found, 0 otherwise. +\ Return 0 if the word is not found. \ Entries with smudge-bit=1 are ignored. cF i, 'l, '@, @@ -303,4 +303,13 @@ cF i, '{, '_, '_, '}, \ Drop addr u return it 'e, l! +\ 'G' ( w -- xt ) +\ Get CFA of the word +cG i, + 'C, '+, '#, '?, \ ( addr len+flag ) + 'L, kOk0-, '&, \ take length + '+, \ add length to the addr + 'L, k1k0-, '+, \ add 1 to the addr (1byte for len+field) + 'a, \ align +'e, l! Q