The Z80 simulator reads from a file containing Z80 machine language in hex format and interprets the code in the way a real Z80 microprocessor would as far as this is possible. Each instruction results in a line of terminal output listing the Z80 instruction being interpreted in machine and assembly language and listing the contents of the simulated Z80 registers and flags. The listing can also be saved to a file. It is also possible to dump memory contents every few instructions. The Z80 IN and OUT instructions can read from or write to files or the terminal the simulator is run from. It is possible to request that interrupts (maskable and/or non maskable) are scheduled every time a particular number of instructions has been executed. Some small test programs are provided as examples and as illustration of the input file format which is described in fileformat.txt.
A .het (Hercules emulated tape) image of the software is provided for those running the MUSIC/SP demo system on Hercules who would like to see the simulator running.
Z80 simulator for MUSIC tape image z80sim.het.
Installation instructions are provided in install.txt.
Sim390 users probably can't use .het tape images but can download the required source files from:
Z80 simulator for MUSIC source files
and transfer them to MUSIC using FTP or some other method.
Once the files are in place, the simulator can be built by following the instructions in building.txt.
The final version of the simulator was written to be compiled by the IBM FORTRAN G1 compiler. A small tweak was required to enable it to be compiled by the FORTRAN G compiler available for use with the MUSIC/SP demo system. The original FORTRAN G1 code is also supplied for reference.
After installation, give the MUSIC command
Z80 $Z80:TEST.HEXto run one of the supplied test programs. Alternatively, just use
Z80on its own to run a REXX wrapper program which can be used to manage various tasks from creation of a source file to assembling it and running the assembler output in the simulator. Single letter commands can be typed in a field at the bottom right of the menu screen and executed by pressing enter. Programmable function keys are also defined to carry out the same functions. Press PF1 for brief help on commands and PF key definitions. Bear in mind that some tasks such as batch submission to the cross assembler are not going to work. At least not in this version...
See history.txt for information on the origins of the simulator.
Mail _software_@_beyondthepale_._ie_ (without the underscores) for further information. Bug reports after 20+ years? Why not? I won't promise anything but I'll try to fix them.