vax-disassembler - DEC VAX one-line disassembler
This crate provides a one-instruction disassembler for the Digital Equipment Corporation VAX architecture.
The [ReadMacro32] trait adds the disassemble() function to any object that supports the Read trait. The disassemble function returns an [Instruction] enum.
The [Instruction] enum stores information about the disassembled instruction.
The current version supports disassembly and display of the instruction along with several ways to inspect the details of the instruction. Its intended purpose is to decode memory dumps from a simulated VAX, however, I have plans to increase its functionality as time permits.
- Add ability to output machine code from an Instruction.
- Implement The FromStr trait for the Instruction enum (i.e. add one-line assembly functionality to crate).
- Add awareness of the program counter (PC) to the disassembly instruction.
Examples
use ;
use Cursor;
static SAMPLE_BUFFER: &'static = &;
let mut code_buf = new;
let mut instruction = Vec new;
for _ in 0..5
// The machine code is transformed into Instructions
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
// Instructions have a display implementation. . .
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;