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§
- Command
Line - The
commandLineprotocol answer. - Editor
- The editor as the ROM left it.
- Editor
Layout - Where a model’s ROM keeps its editor in RAM (wiki:
hardware/command-line).
*_ptrfields 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, soleft_shiftandalphastay false here, as do the fields it has no counterpart for.