Add BPL to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-06 20:04:03 -05:00
parent f3160e1bcc
commit 83d303f878
1 changed files with 6 additions and 0 deletions

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);
}