1
0
mirror of https://github.com/mre/mos6502.git synced 2025-01-18 04:30:07 +00:00

Fix build.

This commit is contained in:
Andrew Keeton 2014-10-16 22:02:18 -04:00
parent 8759b15d9e
commit 96f5f15d82

View File

@ -91,7 +91,7 @@ impl Machine {
}, },
(instruction::BMI, instruction::UseRelative(rel)) => { (instruction::BMI, instruction::UseRelative(rel)) => {
let addr = self.registers.program_counter + rel; let addr = self.registers.program_counter + AddressDiff(rel as i32);
log!(log::DEBUG, "branch if minus relative. address: {}", addr); log!(log::DEBUG, "branch if minus relative. address: {}", addr);
self.branch_if_minus(addr); self.branch_if_minus(addr);
}, },
@ -207,7 +207,7 @@ impl Machine {
} }
pub fn branch_if_minus(&mut self, addr: Address) { pub fn branch_if_minus(&mut self, addr: Address) {
if (self.registers.status.contains(PS_NEGATIVE)) { if self.registers.status.contains(PS_NEGATIVE) {
self.registers.program_counter = addr; self.registers.program_counter = addr;
} }
} }