disasm¶
disassemble a memory range
NAME
disasm - disassemble a memory range
SYNOPSIS
disasm start end
DESCRIPTION
Decode the bytes in the half-open hex range [start, end) as P8X
instructions and print one per line:
AAAA: bb bb .. MNEMONIC operand
AAAA is the address, bb the raw opcode bytes, then the mnemonic and
its operand. Operand forms: #$NN immediate, $NNNN 16-bit address,
(Pn) / (Pn)+ register-indirect, or none. An unknown opcode prints
"???" and advances one byte.
Both addresses are hexadecimal. disasm reads memory with peek() only,
so it can disassemble the OS, the BIOS, or a program you LOADed --
but note disasm itself runs in the TPA at $6A00, so don't disassemble
the range it occupies. Output is a plain stream, so it redirects and
pipes (disasm 2000 2100 >OS.LST).
The opcode table is generated from the same source as the assembler
and microcode (genucode.OPC), so disasm never drifts from the ISA.
EXAMPLES
disasm 6A00 6A40 the first instructions of a loaded program
disasm 0100 0130 the BIOS jump table
disasm 2000 2100 >L capture a disassembly to a file
SEE ALSO
dump, dep, asm, run
The text of man disasm on P8X (os/man/disasm in the repository). All commands