Skip to main content

Module cmdline

Module cmdline 

Source
Expand description

The command line being edited and the state of the ROM’s editor (entry mode, alpha, shifts), read from RAM without pressing a key.

The ROM keeps the text reversed and NUL-terminated just below its temporary environments, with no length field; the cursor and the editor’s flags sit in system RAM. Locations per model were found by observation (wiki: hardware/command-line; the 28S: wiki: hardware/hp28s “Command line”).

Structs§

CommandLine
The commandLine protocol answer.
Editor
The editor as the ROM left it.
EditorLayout
Where a model’s ROM keeps its editor in RAM (wiki: hardware/command-line). *_ptr fields hold 5-nibble pointers; the others are nibbles whose bits are listed with them.
Hp28
Where the 28S’s ROM (2BB, its only revision) keeps its command line (wiki: hardware/hp28s “Command line”). The text is kept as on the 48, reversed below a pointer, and zeroed when the line closes; the line closes when it empties, so an open line always has text.

Constants§

MAX_CHARS
Most characters read (the 49G’s RAM could hold more, but no line the ROM edits is that long; more means the pointers are not the ROM’s).

Functions§

command_line
The command line of machine: open or not, its text and cursor.
editor
The editor of machine (48SX, 48GX, 49G, 28S).
read
Read the editor through layout.
read_hp28
Read the 28S’s editor (Hp28). Its shift and α show on the annunciators, so left_shift and alpha stay false here, as do the fields it has no counterpart for.