(FIND) ( -- rec | 0 ), (DEFINE) ( value kind -- ) and (OPCODE) ( -- op | -1 ), entries 3-5. Names are refused as text.c's define refuses them, compared case by case with text.c; a set variable may be set again. 256 hash heads, records growing up and names growing down in dictionary space, used only while the ROM assembles. text.c gains the data directives #, and ", (the ROM's language; its mnemonic and reserved-word tables are data); the nucleus image is byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
733 B
Plaintext
16 lines
733 B
Plaintext
\ main.f18 -- the ROM's entry table.
|
|
\
|
|
\ docs/v4.0.0/MACHINE.md 2.1. The ROM is shared code: a payload calls its
|
|
\ routines through this table and never to an address inside the ROM, so a
|
|
\ rebuilt ROM breaks no payload. It is at the ROM's base, one jump a word,
|
|
\ in a fixed order that only ever grows at its end. Entry i is at the ROM's
|
|
\ base plus i. DATASHEET-F18.md lists each routine's stack effect.
|
|
|
|
: (ENTRIES)
|
|
jump (KEY) \ 0 ( -- c )
|
|
jump (TOKEN) \ 1 ( -- len )
|
|
jump (NUMBER) \ 2 ( -- n flag )
|
|
jump (FIND) \ 3 ( -- rec | 0 )
|
|
jump (DEFINE) \ 4 ( value kind -- )
|
|
jump (OPCODE) \ 5 ( -- op | -1 )
|