Z80-DIS(1)

NAME
z80-dis - an interactive Z80 disassembler for Unix and DO$

SYNOPSIS
z80-dis [-h] [startaddress:outputfile ...]

DESCRIPTION
The z80-dis simulates the Z80 CPU. It has 64kB memory, where data and instructions are stored. It shows content of memory and stack, list of instructions, shows flags and content of all registers. Using z80-dis you can trace your program, change content of registers and memory, change the program and save it. Content of registers is displayed in binary, hexadecimal and decimal scale. All addresses are displayed in hexadecimal scale. The z80-dis executes instructions exactly as the Z80 CPU except several instructions. Instructions for input/output ( in, out, ini, ind, inir, indr, outi, outd, otir, otdr ) do exactly nothing. Halt instruction tests if the interrupt is disabled. If yes it makes an error message and stops running the instructions, otherwise writes a warning and waits for a key. If you press the R key, flag RUN is turned off. Instructions im, di, ei only set appropriate switch, but have no other meaning.

ARGUMENTS
If a couple filename:address is supplied, file filename is loaded to virtual Z80 memory from address address. If file filename exceeds address 65535, file will be clipped. Any number of files can be loaded. Files are loaded sequentially, later file overwrites previous memory content.

OPTIONS
Disassembler called with a -h option prints usage. No other options are accepted.

KEYS
* - reset
  Fills whole memory with zeros, resets all registers. ? or h - help
  Shows the key help screen. L - load
  Loads file from current address (address in PC ).
  After pressing this key, you'll be asked about
  filename. For abort press escape. S - save
  Saves memory from current address (in program
  counter), first enter filename then length.
  Escape aborts saving. q -quit
  Ends the program. Memory content will be discarded. e - execute current instruction
  Executes instruction pointed by the program counter. r - run
  Start executing instructions. If flag TURBO is on,
  memory dump, stack and instruction list won't be
  refreshed. space - skip instruction
  Moves to the next instruction. x - execute instruction
  Asks about instruction and executes it. enter - put instruction
  Asks about instruction and puts it on address in PC. a - defs
  Puts string to memory starting at address of the
  memory dump. When you press the key, a prompt appears.
  Enter comma or whitespace separated list of strings. b - defb
  Same as a , but instead of strings you must enter bytes.
  Accepted numbers are described in z80-asm(5) w - defw
  Same as b , but instead of bytes 16-bit numbers will be
  stored. p - set PC
  After pressing this key you can enter new value of the
  program counter. Numbers are by default in decimal
  scale. For hexadecimal scale you must write prefix 0x
  first. Octal numbers are accepted too but with prefix. 0 s - set SP
  Same as p , but changes stack pointer. m - set memory dump address
  Same as s or p but affects start of the memory dump. t - toggle TURBO
  Toggles the TURBO switch (see run ) f - toggle FOLLOW
  Toggles the FOLLOW switch. When the FOLLOW switch is on,
  memory dump starts automatically at address in the
  program counter. d - toggle EI/DI
  Toggles enable/disable interrupt. i - change IM
  Cyclic switches the interrupt mode. Values are 0, 1, 2.

BUGS
No bugs are known. :-) If you find some, please feel free to send me a bugreport.

AUTHORS
Z80-DIS was written by Brainsoft <brain@artax.karlin.mff.cuni.cz>.

COPYING
Copying 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-2000 Brainsoft

SEE ALSO
z80-asm(1), z80-asm(5), z80-file(5)