Add ORA to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-20 18:47:32 -05:00
parent 9c95ade3a3
commit 8698dc17f9
1 changed files with 8 additions and 0 deletions

View File

@ -291,6 +291,14 @@ impl Machine {
&mut self.registers.status);
}
(Instruction::ORA, OpInput::UseImmediate(val)) => {
self.inclusive_or(val);
}
(Instruction::ORA, OpInput::UseAddress(addr)) => {
let val = self.memory.get_byte(addr);
self.inclusive_or(val);
}
(Instruction::PHA, OpInput::UseImplied) => {
// Push accumulator
let val = self.registers.accumulator as u8;