mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Change semantics of "F" and add "G"
This commit is contained in:
parent
c40f09d70b
commit
1c519e51f8
1 changed files with 10 additions and 1 deletions
11
core.fs
11
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
|
||||
|
|
Loading…
Reference in a new issue