- Periodic "python cmake/generate.py" to sync with makefile changes.
- Ensure that AIO_CCDEFS (makefile) and USES_AIO (CMake generate.py) are
present for PDP-10 simulators. Otherwise, user gets a warning message
when the simulator starts about network support and asynchronous I/O.
In sim_instr(), the effective address is computed; for the case of TAG
(index register addressing), the contents of the specified index register
is added to the effective address, but the result is not masked to 16
bits as per the hardware functionality.
Adding a a 16 bit mask operation fixes the issue.
- Add the missing ibm1130.rc GUI resource file to the Windows build so
that the GUI renders correctly.
- Set the add_simulator TEST_ARGS to "-g" to fix an edge case Heisenbug
encountered during Github CI/CD tests where ibm1130 appears to hang
indefinitely on the Windows runners.
The cause is the GUI's Pump() thread function being prematurely
terminated before all GUI resources are acquired. The net result is an
infinite loop in the MS C runtime trying to exit the process with
unstable internal state. (Separate patch: synchronization across main
and Pump() threads to ensure resource acquisition completes.)
This issue never shows (cannot show) up on non-Windows platforms or
the SIMH makefile.
- Ibm1130/ibm1130_cr.c
- Fix printf() warnings (format should be long, not int)
- Signed/unsigned mismatch, size_t for array indexing
- Comment out the unused trim() function.
- Ibm1130/ibm1130_cpu.c, ibm1130_gui.c: Remove undefined static functions.
* CMake build infrastructure
The squashed commit that builds and packages releases for the SIMH
simulator suite with CMake, version 3.14 or newer.
See README-CMake.md for documentation.
- Initialize local state variable to 0. Likely non functional changes due
to lack of depth in static analysis scan. Coverity detects real problems
like this.
- Migrate use of strncpy to strlcpy to assure safe buffer operations
This avoids a potential invalid pointer dereference when formatting
the return value from sim_instr() if it is < SCPE_BASE but greater
than the previously defined static array size.sizeof
Update simh.doc to reflect this generic change.
Cleaned up a couple of things here. Specifically:
1) scp_reading is only set when CmdThread is actually reading.
2) Avoid calling ResetEvent(hCmdReadEvent) since it has no effect.
3) Calling ReadFile directly rather than calling read_line which ultimately
calls fgets(stdin) and that ultimately calls ReadFile.
4) Added a cleanup mechanism to shutdown the CmdThread
and related open handles to Events and Thread when the program exits.
Remaining potential problems:
1) A user might have type a partial command (scp_reading) but not
completed it by hitting Enter, and then they perform some GUI
interaction which does other things. Some strange output will be
produced on top of the partially entered command line.
2) Whether or not a complete command has been entered, the original
CmdThread will have a read posted on stdin throughout any activity
initiated by GUI activities. It is not clear that the simulator’s console
will coherently be able to change the console’s mode from the line
oriented mode that SCP uses to the character oriented mode used
while instructions are executing with read pending on the input side.