Skip to main content

Module names

Module names 

Source
Expand description

Command names, read at run time from the ROM’s own library tables.

The ROM’s decompiler names a command from the 6-nibble XLIB body (library, command) that precedes every built-in command object, and from the library’s hash table; the link table maps command numbers to objects (RPLMAN p. 13; layouts observed in the 48SX, 48GX and 49G ROMs: wiki: protocols/rpl-libraries). Nothing ROM-derived is compiled in: a NameTable is built from the ROM image the user loaded, once per ROM.

What the table holds:

  • every library whose header, hash table and link table check out (found by scanning the image, so the 49G’s flash banks need no map), with its command names and, where the command starts with one of the argument-checking dispatchers, its argument count;
  • the five unit operator markers (*, /, ^, prefix, end).

Build cost: one pass over the image (512 K nibbles on the 48SX, 4 M on the 49G) and a few thousand table reads; see the ROM-gated test.

Structs§

CommandInfo
A command as the name table knows it.
NameStats
What a built table holds, for reports and tests.
NameTable
Command names and the other ROM facts the decompiler needs, built from one ROM image.
UnitMarkers
The unit operators: ROM pointers to five empty lists (wiki: protocols/rpl-libraries “Unit operators”).