![]() |
![]()
| ![]() |
![]()
NAMEz80-mon - an interactive Z80 monitor with disassembler and emulator for UNIX, Linux and DO$ SYNOPSISz80-mon [-h] [-E] [-B filename] [-R path] [filename[:startaddress] ...] DESCRIPTIONz80-mon simulates the Z80 CPU on instruction level. It is attached with 64 KB memory, where data and instructions are stored. With the bank switching feature it even can access more memory. The monitor displays in the upper left content of memory, lower left the list of instructions in front of PC, followed by the stack. In the right half it shows in the first line the flags and status of IFF and IM. Below follows the content of all registers together with the value of the tick counter. The last but one line is reserved for the (up to 8) breakpoints and finally in the last line either monitor error messages or the current status of the monitor is displayed (FOLLOW-toggle RUN-status CPU-speed PROTO-status KEYBOARD-toggle). Using z80-mon you can trace your program (and even protocol this), change content of registers and memory, change the program, save it, load others e.t.c. It even supports bank switching via the file banks. Content of registers is displayed in binary, hexadecimal and decimal scale. All addresses are displayed in hexadecimal scale. The z80-mon executes instructions exactly as the Z80 CPU. Instructions for input/output ( in, out, ini, ind, inir, indr, outi, outd, otir, otdr ) can be used to communicate with the outer-world via file descriptors. The Halt instruction tests if the interrupt is disabled. If yes it makes an error message and put CPU into wait, otherwise it keeps running. The Halt-pin active symbol is displayed in both cases in the upper right corner of the monitor. If you press the R key, flag RUN is turned off. Interrupt handling and bank switching is still experimental. Use signals under UNIX/Linux or certain key strokes to generate interrupts. On default z80-mon controls a Z80-cpu (with a build in oscillator) and at least 64 KB memory including bank switching hardware; but further hardware may be attached. hardware. Currently there is an external quartz ,needed for synchronisation of several components, a daisy-chain IO-circuit, needed for interrupt handling of several components and an (experimental) Z80-ctc availible. ARGUMENTSIf a couple filename:startaddress is supplied, file
filename is loaded to virtual Z80 memory beginning at
startaddress which must be given in hexadecimal format. A given
address always overrules the obligatory startaddress in the binary file
filename
OPTIONSThe monitor called with a -h option prints usage and exits. The option -E forces emulator mode. This means, after loading an optional Z80 executable the CPU gets a reset and starts immediately execution. Moreover keyboard input is disabled. The option -B must be followed by a filename containing a bank description and -R must be followed by a path pointing to an accessable directory which contains the binaery bank files. If omitted, the current working directory is used. KEYS? or h - help
Q -quit
* - clear
@ - reset
# - zero
$ - null
& - stop
% - breakpoint
L - load
S - save
Backspace - execute current instruction
" - set protocol file
r - run
R - toggle run
Space - skip instruction
D - disassemble
x - execute instruction
Enter - put instruction
. - put instruction
u - defm
v - defb
w - defw
p - set PC
s - set SP
m - set memory dump address
+ - increase clock speed
- - decrease clock speed Tab - toggle FOLLOW
t - toggle disassembling of constants
j - toggle disassembling of addresses
^ - toggle EI/DI
i - change IM
Esc - generates nonmaskable interrupt
! - toggle keyboard read
= - set CPU registers
SIGNALSMost process signals (not system signals SIGKILL, SIGSTOP, SIGCONT) are mapped to maskable interrupts. There are six exceptions: SIGTERM and SIGHUP will terminate z80-mon, SIGABRT will set the monitor in interactive dissamble mode (stops running CPU), SIGUSR1 will cause a reset and SIGUSR2 will cause a NMI. Lastly SIGTRAP will force the CPU immediately to dump its state into the file .CPU. This enables online monitoring of the running CPU. FILES ./.CPU
The file .Z80_ports is used as buffer for the IO-port addresses, if hardware IO-buffering is enabled. The file keyboard_map is used to remap key binding for the IN instruction accessing the stdin port. BUGSInterrupt mode 0 isn't working. If you find some bugs, please feel free to send me a bugreport. AUTHORSZ80-MON was written by Brainsoft <brain@artax.karlin.mff.cuni.cz> and Achim Flammenkamp <achim@math.uni-bielefeld.de> COPYINGCopying of this software must be under terms of the GNU General Public License. There's absolutely no warranty on this software. For more details see file doc/COPY (c) 1999-2004 Brainsoft SEE ALSOz80-asm(1), z80-asm(5), z80-file(5), z80-ports(5), z80-banks(5)
|