Commit graph

11 commits

Author SHA1 Message Date
Derek Peschel
cc97971dc9 TX-0: Make ^E work in readin mode.
sim_instr does not completely follow the outline in the SIMH v3
developer docs. It does not decrease sim_interval in readin mode.
Fixing this, I cleaned up some other things:

- Move the decrease of sim_interval to after the check for breakpoints,
  but before the check for ios. This ensures that sim_interval will
  decrease any time an instruction executes in normal mode, or readin
  mode executes, or ios is set and the CPU is waiting for ios to clear.
  (Except the CPU should be clearing ios itself, not waiting for ios to
  clear, but that fix requires a complete redesign of the I/O routines
  and belongs in another branch.)
- Correctly handle all four combinations of mod_tst and mod_rdin.
- When changing from readin mode to normal mode, if cpu_set_mode returns
  an error, stop with the same error. If cpu_set_mode returns SCPE_OK,
  either stop or continue execution, depending on the word read from tape.
- In petr_boot and in the readin mode code in sim_instr, if the
  PETR is not attached to a file, return SCPE_UNATT. Never try to read
  from an unattached unit; I believe this reads standard input and
  prevents ^E from working.

Overall control structure inside the while (reason == 0) loop:

- When stopping due to an error, break out of the while loop where
  possible.
- After handling "ios is set", continue, don't run readin/test/normal-
  mode code.
- After handling one readin operation, if the code didn't break out
  of the while loop, continue, don't run normal-mode code.
2023-10-09 20:17:13 -04:00
Derek Peschel
6474252ed4 Stop ptp_svc from setting the ios bit; sim_instr never clears it and simulation loops.
The CPU-to-device routines and device service routines need a redesign.
In the meantime, this quick patch makes tape punching possible.
2023-10-09 20:16:38 -04:00
Howard M. Harte
b5b8277611 TX-0: Reconcile license with open-simh. 2022-10-09 09:10:26 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Ray Jewhurst
09109d2186 TX-0: Added register descriptions to all devices 2016-04-07 15:40:04 -07:00
Mark Pizzolato
41978eca80 All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s). 2015-04-03 19:56:37 -07:00
Mark Pizzolato
66dba79418 ALPHA, ALTAIR, AltairZ80, I7094, NOVA, PDP1, PDP10, PDP11, PDP18B, PDP8, SAGE, sigma, swtp6800, TX-0, VAX: Change tabs to spaces which had crept in over time 2015-03-30 10:24:24 -07:00
Mark Pizzolato
995ab8f1e2 More General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-24 14:37:37 -07:00
Mark Pizzolato
95033cee15 Declare the console port input and output polling units for most simulators to potentially allow asynchronous console I/O. 2013-01-21 11:31:29 -08:00
Howard M. Harte
958cb92b31 Update documentation in souce code. 2012-11-20 15:49:26 -08:00
Howard M. Harte
35ef1c8d24 Initial public version of TX-0 for SIMH
Integrate TX-0 simulation into SIMH.
2012-11-07 20:47:26 -08:00