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

Add BEQ to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-06 19:50:35 -05:00
parent 8febc74788
commit a0ad2d47be

View File

@ -122,6 +122,12 @@ impl Machine {
self.branch_if_carry_set(addr);
}
(instruction::BEQ, instruction::UseRelative(rel)) => {
let addr = self.registers.program_counter
+ AddressDiff(rel as i32);
self.branch_if_equal(addr);
}
(instruction::BIT, instruction::UseAddress(addr)) => {
let a: u8 = self.registers.accumulator as u8;
let m: u8 = self.memory.get_byte(addr);