1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-16 19:18:45 +10:00
collapseos/forth/dict.fs
Virgil Dupras 6652125d47 Remove link.fs
This was a dead end.
2020-04-07 21:23:42 -04:00

19 lines
415 B
Forth

( Get word header length from wordref. That is, name length
+ 3. a is a wordref )
( a -- n )
: WHLEN
1 - C@ ( name len field )
0x7f AND ( remove IMMEDIATE flag )
3 + ( fixed header len )
;
( Get word addr, starting at name's address )
: '< ' DUP WHLEN - ;
( Get word's prev offset )
( a -- a )
: PREV
3 - DUP @ ( a o )
- ( a-o )
;