Expand description
What rides on the calculators’ Kermit transfers (wiki:
protocols/hp-object-format), for hosts that talk to the ROM’s server:
the binary transfer file (HPHP48-x / HPHP49-x header and packed
nibbles) decoded to an Object and encoded from one, the text of
programs, algebraics, units and commands filled in from the ASCII
transfer of the same object, and RPL source text for objects sent as a
host command. No I/O and no protocol: the Kermit exchange is the
host’s.
Structs§
- Stack
Reply - The stack text the ROM’s Kermit server returns for a host command
(
C), already translated from the HP character set.
Enums§
- Family
- The calculator family a binary transfer file names.
Constants§
- HEADER_
LEN - Length of the binary transfer header (
HPHP48-x).
Functions§
- ascii_
body - The text of an ASCII transfer after its
%%HP: T(t)A(a)F(f);header line, or all of it when it has none. - binary_
header - The header of a binary file sent to
family. Its ROM letter (X) is not checked by the calculators. - decode_
file - Decode a binary transfer file (
HPHP48-x/HPHP49-xheader). - encode_
file - The binary transfer file for
obj(header and packed nibbles, exactly as long as the object), orNonefor objects that only travel as text (programs, algebraics, units, arrays, commands other than XLIB names). - fill_
sources - Fill the text of programs, algebraics, units, commands and unknown
objects in
objfromtext, the ASCII transfer of the same object (the%%HP:header is skipped). Walks the text in step with the decoded tree; if they disagree, nested texts stay unset and a top-level program, algebraic or unknown object gets the whole text. - graphic_
file - The binary transfer file of the GROB that pictures
g(Graphic::to_grob). - is_
binary_ file - Whether
datastarts with a binary transfer header (HPHP48-orHPHP49-and a printable ROM letter). - is_
plain_ name - Whether
nameis a plain global name that, quoted as'name', cannot close its quotes: 1 to 127 characters, not starting with a digit or a point, without whitespace, control characters, RPL delimiters, operators or a backslash (a host command readsA\GSasAΣ, a transfer as the bytes), all in the HP character set. - pack
- Nibbles packed two per byte, low nibble first; an odd count ends with a 0 nibble.
- parse_
stack - Parse the stack display of a host command: an optional first line
Error: X, thenEmpty Stackor the levels from the highest down, each starting withN:; any other line continues the level before it. Never fails: text before the first level is ignored. - to_
source - RPL source that compiles to
obj, orNonewhen it has none (a string holding", a local name, a character, an unknown object). - unpack
- Bytes as nibbles, low nibble first (the transfer file’s packing).