aboutsummaryrefslogblamecommitdiff
path: root/src/main.rs
blob: 354402923a0cee7d09c4bce8946b93735f6f798f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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]));
}