The VFX Forth system includes a disassembler for debugging purposes. Native code built by the system can be viewed at a machine code level.
: al-init-dis \ addr len -- ; initialise disassembly
Initialise the disassembly range before using (DASM).
: ft-init-dis \ from to -- ; initialise disassembly
Initialise the disassembly range before using (DASM).
: 1DISASM \ --
Disassemble the next instruction. The range has already been set.
: (dasm) \ --
Disassemble a block of code whose range has already been set.
: disasm/f \ addr --
Disassemble memory starting at ADDR.
: disasm/ft \ from to --
Disassemble memory between the memory addresses FROM and TO.
: DISASM/al \ addr len --
Disassemble LEN bytes of code starting at memory address ADDR.
: dasm \ -- ; DASM <word>
Disassemble a given definition
VFX Forth also contains some higher-level words to aid
disassembly. These words attempt to interpret the raw
assembler code as provided by DASM
to identify items
such as inline strings and USER
variables.
: dis \ -- ; DIS <name>
Disassemble a supplied target word using the higher level
interpreter to aid readability.
: see \ -- ; SEE <name>
An alias for DIS
supplied for compatibility with other
Forth systems.