[Simh] Printing and parsing registers
Bob Supnik
bob at supnik.org
Sat Sep 12 15:46:03 EDT 2015
When flag REG_VMIO is set, printing/parsing are done through the
user-supplied print/parse routines, a special switch is set, and the
normal UNIT pointer argument is left as null.
For the REG_VMIO case ONLY, scp could fill in the UNIT pointer argument
with a pointer to the register data structure (cast to pointer to unit),
which would allow fprint/fparse to know what register is being
referenced and to pick up any additional information that might be
necessary for printing and parsing, including flags added to their
proper spot, the flags field.
The problem, of course, is that (REG *(UNIT *(reg structure)) may not be
idempotent on some hosts (like word-oriented machines), not that many of
these exist anymore. However, I think it's cleaner, in general, to put
flags where they belong and find a way to let the print/parse routines
know what register they're working on if REG_VMIO is set.
/Bob
More information about the Simh
mailing list