1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-28 00:28:05 +11:00
collapseos/blk/077
Virgil Dupras d8de8a058a Make word routine refs 1b instead of 2
Saves quite a bit of binary space. More than 300 bytes in forth1.bin
2020-04-15 15:16:11 -04:00

17 lines
520 B
Plaintext

Dictionary
A dictionary entry has this structure:
- Xb name. Arbitrary long number of character (but can't be
bigger than input buffer, of course). not null-terminated
- 2b prev offset
- 1b size + IMMEDIATE flag
- 1b code pointer (always jumps in the <0x100 range)
- Parameter field (PF)
The prev offset is the number of bytes between the prev field
and the previous word's code pointer.
The size + flag indicate the size of the name field, with the
7th bit being the IMMEDIATE flag. (cont.)