Altered the calling sequences to fprint_sym and parse_sym in ex_reg and dep_reg to merge user-defined register flags with the radix in the addr parameter. This allows the print and parse routines to identify the register or determine how it is to be handled. These are called in lieu of the standard print and parse routines if a register has REG_VMIO or at least one user-defined flag set.
Problem was the console storage output buffer was masked with a WMASK instead of a BMASK (it is only a 8 bit register).
Also, the input interrupt processing cleared the output interrupt state instead of the input interrupt state. This would only be a problem when interrupts are actually used instead of polled I/O.
This reverts commit 7c7b44e409.
The prior commit didn't work for static initializers. There are other ASCII dependencies in simh. They should all be solved together or not at all.
Added -Q switch to suppress version check messages
Added -D switch to disable the detach_all at the beginning of a restore and any actual attach operations during the restore
Distinguish explicitly between save_vercur, the version that is
used by sim_save(), and save_ver40, the latest defined version
that is supported by sim_rest().
The intent is to ensure that a change to save_vercur does not
cause an unedited sim_rest() to think it knows how to read that
new format if a human forgets to add the appropriate logic. This
also removes some possible ambiguity in sim_rest() about what
elements are present in what format versions.
Finally, added a comment reminding authors to update save_vercur
in conjunction with any changes to sim_save().
- added verification of the existence of simulator registers which they are referenced.
- sim_frontpanel API version checking to make sure that the invoking API and the simulator support the same capabilities.
- added the ability for a simulator to reference data in simh register data which is not in the set of registers defined in the default simh device (usually the CPU).
- added a simulator time reference relating to a set of register data which is provided.
- added example automatically creating a console terminal port from a simulator startup (front panel or not).
This approach removes the burden from any simulator code to perform instruction execution postlude before calling sim_process_event and prelude activites when sim_process_event returns.
Remote Console commands are now executed from the same simulator context as if entered from the initial sim> prompt.
- Provide a sim_islower(), sim_isalpha(), sim_isprinit(), sim_isdigit(), sim_isgraph(), sim_isalnum() which make sure that the character being examined as an unsigned char.
- Ignore a UTF_BOM sequence at the beginning of command files.
- Provide a sim_isspace() which makes sure that isspace only considers the character being examined as an unsigned char.
The commands which operate through run_cmd (GO, STEP, CONTINUE, BOOT, RUN) will all exit with a status which is NOT SCPE_OK. Most of the exit status values will be 100% normal and not indicative of a true error, so producing error message context is not necessary or desired.
The current implementation of "run_cmd" in scp.c calls "fprint_stopped_gen" (via "fprint_stopped") to print the message associated with the "sim_instr" return status. Messages associated with VM stops must be provided to the SCP via the "sim_stop_messages" array.
"fprint_stopped_gen" prints the status message in a rigid format: the message string, a comma, the program counter register name, a colon, the current PC value, and the instruction at that address in symbolic format.
For example:
HALT instruction, P: 24713 (LDA 1)
Only the message string is under the control of the VM. If additional information is needed, it can only be added before the first comma.
The HP2100 simulator does this for halt instructions, which contain device select code and flag hold/clear bit fields that, in practice, are used to communicate to the operator the significance of the particular halt encountered, rather than to affect the device interface:
HALT instruction 102077, P: 24713 (LDA 1)
To implement this, the simulator must define the message as a variable and then copy the formatted octal value into the buffer at the appropriate location before returning from "sim_instr".
However, if the VM wants to display a different register value, e.g.:
Self test #13 complete, STAT: 000020
...this cannot be done without also displaying the program counter, which may be irrelevant for the given stop condition.