From e4acd0575d6d9f01be6b174d0967aeea7b6be783 Mon Sep 17 00:00:00 2001 From: Andrew Keeton Date: Sun, 16 Nov 2014 21:14:23 -0500 Subject: [PATCH] Add EOR to execute_instruction(). --- src/machine.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/machine.rs b/src/machine.rs index 159206f..8b23bbf 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -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;