1
0
mirror of https://github.com/mre/mos6502.git synced 2024-11-25 02:33:26 +00:00

Add exclusive_or().

This commit is contained in:
Andrew Keeton 2014-11-16 21:20:42 -05:00
parent e4acd0575d
commit b7cc5cd234

View File

@ -696,6 +696,11 @@ impl Machine {
self.compare(y, val);
}
fn exclusive_or(&mut self, val: u8) {
let a_after = self.registers.accumulator ^ (val as i8);
self.load_accumulator(a_after);
}
fn push_on_stack(&mut self, val: u8) {
let addr = self.registers.stack_pointer.to_address();
self.memory.set_byte(addr, val);