1
0
mirror of https://github.com/mre/mos6502.git synced 2024-06-01 14:41:38 +00:00

Add BPL to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-06 20:04:03 -05:00
parent f3160e1bcc
commit 83d303f878

View File

@ -157,6 +157,12 @@ impl Machine {
self.branch_if_minus(addr);
}
(instruction::BPL, instruction::UseRelative(rel)) => {
let addr = self.registers.program_counter
+ AddressDiff(rel as i32);
self.branch_if_positive(addr);
}
(instruction::CLC, instruction::UseImplied) => {
self.registers.status.and(!PS_CARRY);
}