Z80Disasm
Z80Disasm
Z80Disasm is a freeware command-line Z80 disassembler for Windows. It is a symbolic labeling disassembler that supports all Z80 instructions and can read either TRS-80 CMD files or Intel HEX files.
The Z80Disasm command line looks like this:
Z80DISASM [options] [file]
The following options are supported:
-v:<file> | Read file from a TRS-80 virtual disk instead of a Windows directory. |
-s:<file> | Use <file> as a screening data file. |
-o:<file> | Write disassembly to <file> instead of screen. |
-r | Don’t generate symbolic labels during disassembly. |
For example, to disassemble the program SCRIPSIT.CMD to the screen, the command line would look like this:
Z80DISASM SCRIPSIT.CMD
To disassemble the program ROBOT.CMD to the file ROBOT.ASM, using the screening file ROBOT.SCR, the command line would look like this:
Z80DISASM -o:ROBOT.ASM -s:ROBOT.SCR ROBOT.CMD
To disassemble the program VC/CMD which is contained on VISICALC.DSK, the command line would look like this:
Z80DISASM -v:VISICALC.DSK VC/CMD
Screening files
Z80Disasm supports the use of screening files to separate data from code. By using a well designed screening file, data areas can be properly marked using DB and DW pseudo-ops instead of meaningless instructions.
A screening file follows a well-defined format, consisting of address ranges separated by commas. (Long time TRS-80 users may remember this format as similar to that used by DSMBLR, the MISOSYS disassembler for the TRS-80.)
Four different types of address ranges are supported:
aaaa | one byte at aaaa |
bbbb-cccc | a range from bbbb to cccc |
-dddd | a range from 0×0000 to dddd |
eeee- | a range from eeee to 0xFFFE |
Two types of prefixes are supported for ranges:
$ | identify as byte data (the default) |
# | identify as word data |
For example, here is a valid (albeit meaningless) sample screening file:
$3000,$3A1B-3A1D
#3010-3014,#E000-
$-1000
That screening file indicates the following areas of data:
- One byte of data at 0×3000
- Byte data between 0x3A1B and 0x3A1D
- Word data between 0×3010 and 0×3014
- Word data between 0xE000 and 0xFFFE
- Byte data between 0×0000 and 0×1000
NOTE
Z80Disasm is freeware, but remember that it is not public domain software. All copyrights connected with the program and its accompanying document files remain with me (Matthew Reed).