more operations, better debugging

This commit is contained in:
Daniel Bauer
2019-12-25 19:21:30 +01:00
parent aa889f7e33
commit f56fc05579
3 changed files with 64 additions and 41 deletions

View File

@@ -44,11 +44,14 @@ impl Disasm {
let jmp_addr = Disasm::get_rel_addr(rel_addr, addr+2);
format!("#{:02x} => {:#06x}", rel_addr, jmp_addr)
},
AddrMode::IND | AddrMode::IZX | AddrMode::IZY=> {
AddrMode::IND => {
let addr = mem.readw(mem_iter.next().unwrap());
mem_iter.next().unwrap();
format!("{:#06x}", addr)
},
AddrMode::IZX | AddrMode::IZY => {
let addr = mem.readb(mem_iter.next().unwrap());
format!("{:#06x}", addr)
}
AddrMode::IMP => String::from(""),
_ => bail!("Disassembly of {} not implemented", i.addr_mode),