1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-30 22:48:08 +11:00
collapseos/blk/085

16 lines
576 B
Plaintext
Raw Normal View History

Word types
2020-04-15 04:25:14 +10:00
There are 4 word types in Collapse OS. Whenever you have a
wordref, it's pointing to a byte with numbers 0 to 3. This
number is the word type and the word's behavior depends on it.
2020-04-15 04:25:14 +10:00
0: native. This words PFA contains native binary code and is
jumped to directly.
2020-04-15 04:25:14 +10:00
1: compiled. This word's PFA contains an atom list and its
execution is described in "EXECUTION MODEL" above.
2020-04-15 04:25:14 +10:00
2: cell. This word is usually followed by a 2-byte value in its
PFA. Upon execution, the address of the PFA is pushed to PS.
2020-04-15 04:25:14 +10:00
(cont.)