Skip to main content

Module prolog

Module prolog 

Source
Expand description

Object types by prolog and the size walk over nibbles.

Prologs, type names and the rules for finding an object’s end: wiki: protocols/hp-object-format (RPLMAN chapter 3; the 49G types from the Conn4x sources; DOEXT0-4 from the 48 entry list). The names are those the calculator’s G D directory listing prints.

Structs§

Record
One variable record of a directory body (wiki: hardware/hp48-system-ram “Directories”): a 5-nibble offset from this field back to the previous record’s name length field (0 for the first record), the name’s length n in 2 nibbles, its characters, n again (absent when n = 0), the object. Records lie oldest first; the directory’s offset field points at the newest.

Enums§

ObjectType
Object types by prolog.

Constants§

MAX_DEPTH
Deepest nesting the walks follow.
SEMI
SEMI, the end marker of composites (lists, programs, algebraics, units).

Functions§

element_size
Size of an embedded object (composite element, tagged payload, directory variable): an object with a known prolog, else a 5-nibble ROM pointer.
object_size
Size in nibbles of the object at nibble at. Fails on an unknown prolog, a truncated object or nesting deeper than MAX_DEPTH.
read_field
The width-nibble field at at, low nibble first; None past the end or for fields wider than 8 nibbles.
records
The records of the directory body whose last-variable offset field is at offset_at (records follow it), in memory order (oldest first).