SimH Commands

How to get the most out of the SimH command language.

The primary documentation for interacting with the simulator was described in the Getting Started page.  The most important ones are:
simh_doc.doc === General info about the simulator and its command language.
nova_doc.doc === Specific info that applies to nova.exe.

Reading those docs is not easy, nor is it obvious how IRIS might make use of them. So the interests of time, we will try to offer some abbreviated info here that might be useful to you. Once you understand the items below, I recommend going back and reading the above docs to learn more about the simulator.

Switching Between IRIS and SimH Consoles

The main console is where you booted IRIS. You can switch back and forth between the SimH console and IRIS Port zero any time.

To escape from IRIS to the SimH console you type a single control character. Our current default is Control-F. SimH normally defaults to Control-E, but that does not work well under IRIS, because we need the Control-E for preceding passwords. Fortunately, SimH lets you set whatever you want for the escape character. For example, our distributed SimH batch file contains the following command:


That sets the escape character to Control-F. The ‘6’ is an OCTAL value of the control character. If you prefer another, you can change it.

When you press Control-F on the IRIS Port 0 console, NOVA.exe will immediately suspend all execution on the nova and produce the ‘sim>’ prompt. You can then use any SimH command. If you are working in assembly, this can be handy for examining memory, looking at the disk, and doing other tasks.

To resume IRIS from the sim> prompt, you use the CONTINUE command, which can be abbreviated as ‘C’.

sim> C {return}

You are returned to IRIS, but it might not be obvious. If you were sitting at an IRIS prompt when you escaped to the SimH console, then you are logically back at the IRIS prompt, but since it had already been printed previously, you can no longer see where you are. For example, if you were at the IRIS system prompt ‘#’, that is where you are returned. But you will have to press {return} a second time if you want the system to display the ‘#’ again.

Simulating Hardware Devices

Some hardware like disks and printers are simulated by some file on the host computer (e.g. Windows). They are usually connected to SimH via the ATTACH command. In some cases, the nature of the device has to be clarified before the file is attached. Use the following links to learn more about various devices.

Disk Drives on SimH
Line Printers on SimH

Misc Commands

You can generate a logging file that logs all console and IRIS Port zero output to a file.
The console window still works normally. The logging can be very helpful if you want to do BASIC program listings or DSP listings. Just start the logging, list whatever you want to the screen, then turn off logging. You can then use your host computer tools (e.g. Notepad++) to view the listings.

SET CONSOLE LOG=<filename>   ; log console output to file
SET CONSOLE NOLOG   ; disable logging

To shut down the simulator use the Quit command

Q  ; exit simulator

Setting Breakpoints

Very useful for debugging assembly programs or tracing any features of IRIS.
Setting a break-point at address ‘x’ means that when the simulator is about to execute the machine instruction located at ‘x’, it will instead suspend IRIS and exit to the simH console. You can then examine the accumulators, memory, or even places on the disk drives.

BREAK <address>  ; set break at this address
BREAK   ; set break at current PC
SHOW BREAK ALL   ; display currently set break-points
NOBREAK ALL  ; remove all break-points
NOBREAK <address>  ; remove break-point at this address
NOBREAK  ; remove break-point at current PC

Examining / Setting Accumulators and Memory

To see the contents of accumulators …

E AC0  ; display AC0 contents
E AC0-AC3  ; display contents of all 4 accumulators
I AC2   ; insert value for AC2 (prompt moves to next line for value)
I AC0-AC3  ; insert values for multiple AC’s (on following lines)

To view memory …

E address  ; display contents of ‘address’ (octal)
E addr1-addr2  ; display range of addresses (octal)
E -M address  ; display contents as assembly instruction
E -C addr1-addr2  ; display contents as ASCII bytes (2 per word)

To modify memory, any of the above commands can be preceded with an ‘I’ as in:

IE address  ; display and allow address to be modified

Word values can be entered in octal or in assembly command syntax.
Simply pressing return without any entry will leave the address unmodified.

Note that when using the -C switch for character display, control characters are shown as 7-bit values inside brackets, like <012> even though the actual value might be 212.

Leave a Reply