diff options
author | Determinant <ted.sybil@gmail.com> | 2017-11-08 11:41:14 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2017-11-08 11:41:14 -0500 |
commit | 2bba9f76f6643120d609a7766a3ffbaf32abcfff (patch) | |
tree | 87560a79ea799e03c0e209faf8e691478a8abd6e /src/main.rs |
init
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..3544029 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,15 @@ +mod mos6502; +use mos6502::disasm; +fn main() { + let code = [0xa9, 0x01, 0x8d, 0x00, 0x02, 0xa9, 0x05, 0x8d, 0x01, 0x02, 0xa9, 0x08, 0x8d, 0x02, 0x02 ]; + let code2 = [0xa9, 0x03, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x02 ]; + let dasm = disasm::Disassembler::new(code2.iter()); + for l in dasm { + println!("{}", l); + } + let a = 0x03; + let b = 0x4c; + let c = 0x08; + let d = 0x06; + println!("{}", disasm::parse(code2[0], &[a, b, c, d])); +} |