- 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.
001. PROBLEM: Cannot show radix, etc. for a device that has no modifiers.
OBSERVATION: The default data radix for a device may be set with the SET
<dev> OCT|DEC|HEX command. However, if the device does not have a modifier
table, SHOW <dev> RADIX is rejected with "No settable parameters".
The same problem occurs for SHOW <dev> DEBUG and SHOW <dev> NAMES. For a
device that provides debug printouts, SHOW <dev> MOD will list "DEBUG,
NODEBUG" among the modifiers, and the SHOW <dev> DEBUG command will display
the current debug status. However, if the device does not contain a
modifier table, SHOW <dev> MOD and SHOW <dev> DEBUG will report "No
settable parameters", even though SET <dev> DEBUG is accepted and works as
expected. For such a device, SHOW MOD will show "DEBUG, NODEBUG" as
acceptable modifiers.
002. PROBLEM: SET and SHOW responses for invalid entry are inconsistent.
OBSERVATION: Entering SET <dev> <mod> where <mod> is not defined in the
device's modifier table displays "Non-existent parameter." Entering SHOW
with the same parameters displays "Invalid argument."
Similarly, entering SET <dev> DEBUG for a device that does not have
debugging capability displays "Command not allowed." Entering SHOW with
the same parameters displays nothing.
In both cases, the messages displayed should be the same for the same
error.
OBSERVATION: For a simulator stop, sim_vm_fprint_addr (if defined) is
called to print the value of the program counter, regardless of whether or
not the register was defined with REG_VMAD. However, displaying the PC
value with "examine" calls sim_vm_fprint_addr only if the REG_VMAD flag is
present. The displayed value of the PC should be the same in both cases.
For a command like: SEND MUX:0 "abc"
in which a device is specified but there are no after=nn and delay=nn parameters, the code neglected to update cptr, resulting in an illegal argument error condition.
Compare operations will do a literal compare of basic string values unless the all of each string contains numeric data. If numeric data is there then a numeric comparison will be made. For example:
If "+1" == "1" echo equal
will display equal, while the simple string comparison will be not-equal.