header

FAQ Index

  1. How to import/export files into/from the simulator environment?
  2. How to use a program which requires a VT100?
  3. Why is terminal output so slow?
  4. The simulation appears to do nothing but my real CPU is running at full steam. What can I do?
  5. How to use MP/M with multiple consoles?
  6. How to set the clock rate of the simulated CPU?
  7. How to compile the simulator from the sources (PC)?
  8. How to compile the simulator from the sources on Linux?
  9. How to compile the simulator from the sources (macOS)?
  10. How to compile the simulator from the sources (UNIX)?
  11. I get a "file open error" although all files exist in the simulator directory
  12. My screen editor uses ^E (Control E) for cursor control but this stops the simulator. How can I change this?
  13. How to get R.COM on a CP/M compatible system without any Xmodem or similar software

How to import/export files into/from the simulator environment?

On the CP/M 2.2 disk you find the programs R.COM and W.COM. With the CP/M command "R XYZ.COM" you can transfer the file XYZ.COM from your local directory into the simulator environment. The command "W XYZ.TXT" does the opposite, i.e. the text file XYZ.TXT is transferred from the CP/M disk to your local directory. "W XYZ.COM B" transfers the file XYZ.COM in binary mode.

In case you need to transfer multiple files you can use wildcard characters or alternatively you can create a batch file containing the necessary commands. Execute the batch file using DO.COM (this is the same program as SUBMIT.COM).

How to use a program which requires a DEC VT100?

Some CP/M applications such as WordMaster (WM.COM) require a terminal with cursor addressing capabilities. The DEC VT100 terminal is a typical example and most CP/M programs with nontrivial console output have been customized for the DEC VT100.

On modern Windows, Linux and macOS systems the command shell you use for launching the simulator already can process the DEC VT100 escape command sequences. If you have trouble on Windows 11, make sure you launch the simulator using "Windows Terminal". Otherwise you need to use Telnet or another terminal program as described below.

  1. Boot CP/M (or any other operating system) as usual
  2. Type ^E (Control E) to stop the simulator
  3. Type "ATTACH SIO 23" and confirm with the return key. Port 23 is the default port for Telnet sessions and you need to make sure you have the necessary permissions to create a socket on this port. If not, you must run the simulator as "root" or with the sudo command or use another port.
  4. Type "GO" and confirm with the return key
  5. Start Telnet or PuTTY (Windows). On older versions of Windows PuTTY is recommended due to issues with the provided Telnet client. The configuration of PuTTY should look like PuTTY
  6. Connect Telnet (resp. PuTTY) to 127.0.0.1 (localhost) and make sure you specify the port you chose in section 3 if you are using a port different from port 23.

Now you can execute all commands in the Telnet (resp. PuTTY) terminal window which supports DEC VT100 emulation.

Why is terminal output so slow?

In order to reduce CPU load in keyboard polling, the simulator waits for a short period (100 microseconds on UNIX, 1 millisecond on Windows) when the simulated program checks for an input character but none is available. Sometimes this has the undesirable side effect of slowing down output as there are often tests for keyboard input to stop the output. You can disable the waiting by issuing set sio nosleep at the command prompt or including this statement in the startup file.

The simulation appears to do nothing but my real CPU is running at full steam. What can I do?

Often the simulated program does not appear to do anything useful (e.g. it just displays an input prompt) but the real CPU is fully loaded. This is often caused by keyboard polling routines which constantly check a port whether a character is available. This can be avoided by issuing the the command set sio sleep at the command prompt or including this statement in the startup file. Please note that enabling this sleep might degrade overall performance (see this question). You can also fine tune the time to sleep after an unsuccessful keyboard poll with the command d sleep <n> where <n> denotes the time in microseconds (UNIX, default is 100) respectively milliseconds (Windows, default 1).

How to use MP/M with multiple consoles?

Within the simulator, execute the SIMH command file "mpm" which comes with the MP/M disk. This command file includes the command "ATTACH SIO 23" and you can Telnet to 127.0.0.1 (localhost) as described above. In the first Telnet terminal window, execute the CP/M command "MPM" to start MP/M. Now you can create up to three additional Telnet sessions to 127.0.0.1.

How to set the clock rate of the simulated CPU?

If you use the simulator "as is" it will run at maximum speed which can easily correspond to a 100 MHz Z80 or 8080 CPU. Since some programs, in particular games, expect a CPU running, e.g., at 4 MHz, you can set the clock rate manually in KHz increments. At the simh> prompt type d clock 4000 to set the clock rate of the simulated CPU to 4000 KHz, i.e. to 4 MHz. You can return to maximum speed by issuing d clock 0.

How to compile the simulator from the sources (PC)?

The following is based on Microsoft Visual Studio Community.

  1. If you have not done so, install Microsoft Visual Studio Community
  2. Unpack all sources into a separate directory
  3. Open a "Developer Command Prompt for VS 2022" and navigate to the directory with the sources
  4. Execute nmake /f makefile_visualstudio
  5. Execute altairz80 to start the simulator

How to compile the simulator from the sources on Linux?

The following assumes that you have installed a C development environment.

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. cd to the directory with the sources
  4. Execute make -f makefile_linux
  5. Execute ./altairz80 to start the simulator

How to compile the simulator from the sources (macOS)?

The following assumes that you have installed the Apple Developer Tools which come as part of Xcode and can be installed by executing xcode-select --install in a terminal window.

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. cd to the directory with the sources
  4. Execute make -f makefile_macintosh
  5. Execute ./altairz80 to start the simulator

How to compile the simulator from the sources (UNIX)?

The following assumes that you have installed a C development environment with GCC available.

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. cd to the directory with the sources
  4. Execute make -f makefile_unix
  5. Execute ./altairz80 to start the simulator

I get a "file open error" although all files exist in the simulator directory

Make sure that all .dsk files are writable and not accidentally read-only. Sometimes decompressing the zip-archive results in files with read-only permissions.

My screen editor uses ^E (Control E) for cursor control but this stops the simulator. How can I change this?

You can change the interrupt character with "d wru <new value>". where <new value> is the ASCII character code of the new interrupt character. You could use "d wru 1d" which sets the interrupt character to Control ] but be sure that you actually can create this character via the keyboard. The current value of the interrupt character can be examined with "e wru".

How to get R.COM on a CP/M compatible system without any Xmodem or similar software

  1. Make sure that R.COM is in the directory from where you boot the system
  2. Boot the system (e.g. CDOS)
  3. At the operating system prompt (e.g. "A.") type ^E
  4. At the "simh>" prompt execute the following commands:
    load R.COM 100
    d 80 6
    d 81 ' '
    d 82 'R'
    d 83 '.'
    d 84 'C'
    d 85 'O'
    d 86 'M'
    g 100