B. Scott Michel's run of clang memory sanitizer potentially identified
that when a substring doesn't match the returned array offsets would
be -1.
This commit handles that potential and sets the respective substring as
an empty string.
- Behave well when NOCALIBRATE mode is enabled after some instruction
execution already happened.
- Properly detect the reliable calibrated clock or use the internal one.
- Add common system includes used in may places which are allowed
and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
for use only by SCP library routines into sim_scp_private.h.
Asynchronous MUX functionality was added long ago and never completely
tested and thus never completed and never actually used.
All of what it was supposed to achieve was independently achieved when
bit rate speed functionality was added.
NOCALIBRATE mode allows all activity of a simulator run to occur with
precisely consistent event timing. In this mode, every clock tick takes
precisely the same number of instructions/cycles. Likewise, the polling
activities for MUX or other poll oriented devices occurs after precisely
the same number of instructions/cycles executed. As a consequence of
this mode, no effort to align simulated clock ticks (and simulated access
to wall clock time) is made.
This mode might be useful for running diagnostics which expect a
particular relationship between perceived wall clock and instruction
times. It might also be useful for running test scripts which may want
to compare output of previous executions to to current execution or
to compare execution on arbitrarily different host computers.
In NOCALIBRATE mode, the operator gets to specify the pseudo
execution rate along with the base wall clock time that access to
pseudo wall clock accesses returns.
strtotv was extended long ago to allow radix prefixes (0x, 0X, 0b, 0B
and 0) for input when 0 was specified as the parsing radix. The uses
from calls to get_uint() need to specify a 0 radix to leverage this
which wasn't done at that time.
AltairZ80 uses 0 for the VM-specific HLT instruction stop code.
SCP defines SCPE_OK as 0.
SCP uses 0 to mean all errors ("ON ERROR").
The command "ON 0" will generate "%SIM-ERROR: Invalid argument: 0".
This PR changes the HALT stop code from 0 to 5.
- Validation was incorrect for large numbers
- Polish help text for DO command variable insertion
- Polish help text for file name part expansion
- Add SIM_RUNTIME (number of instructions/cycles executed)
- Add SIM_RUNTIME_UNITS (instructions or cycles)
Partial reading is needed to properly read common archive images found
on bitsavers and elsewhere which were made from QIC devices which must
read multiples of 512 bytes at a time.