Add EOR to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-16 21:14:23 -05:00
parent fab7ff5cf0
commit e4acd0575d
1 changed files with 8 additions and 0 deletions

View File

@ -220,6 +220,14 @@ impl Machine {
self.dec_x();
}
(instruction::EOR, instruction::UseImmediate(val)) => {
self.exclusive_or(val);
}
(instruction::EOR, instruction::UseAddress(addr)) => {
let val = self.memory.get_byte(addr);
self.exclusive_or(val);
}
(instruction::INC, instruction::UseAddress(addr)) => {
let m = self.memory.get_byte(addr);
let m = m + 1;