Files
LithosAnanake/capsules/v4/rom/main.f18
T
rajamesandClaude Opus 5.5 0f82d8c22a feat(v4): mkrom -- the ROM built off the node; it reads tokens
The ROM's source is F18 code in capsules/v4/rom, assembled off the node by
v4/tools/mkrom.c with the memory map's constants from v4/tools/mkmap.c
(MACHINE.md 2).  main.f18 is the entry table payloads call through (2.1);
in.f18 reads the console and splits it into tokens exactly as text.c does,
the token held packed as a counted string.  The ROM's state is a reserved
area of the map (host_map.h ROM_*).  text.c gains the constant directive,
so the off-node assembler and the ROM speak one language.  The map also
names (NUMBER)'s state, for the next task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:49:05 -04:00

12 lines
519 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 )