Skip to content

Instantly share code, notes, and snippets.

@bokuweb
Last active April 11, 2018 13:35
lazy_static! {
pub static ref MAP: HashMap<u8, Opecode> = {
let mut m = HashMap::new();
m.insert(0xA9, Opecode { name: Instruction::LDA, mode: Addressing::Immediate, cycle: cycles[0xA9] });
m.insert(0xA5, Opecode { name: Instruction::LDA, mode: Addressing::ZeroPage, cycle: cycles[0xA5] });
m.insert(0xB5, Opecode { name: Instruction::LDA, mode: Addressing::ZeroPageX, cycle: cycles[0xB5] });
m.insert(0xAD, Opecode { name: Instruction::LDA, mode: Addressing::Absolute, cycle: cycles[0xAD] });
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment