1
0
mirror of https://github.com/mre/mos6502.git synced 2024-12-22 12:29:31 +00:00

Add branch_if_carry_set().

This commit is contained in:
Andrew Keeton 2014-11-06 19:39:46 -05:00
parent eb5c3f3c2a
commit da6a28f639

View File

@ -554,6 +554,12 @@ impl Machine {
}
}
fn branch_if_carry_set(&mut self, addr: Address) {
if self.registers.status.contains(PS_CARRY) {
self.registers.program_counter = addr;
}
}
fn branch_if_minus(&mut self, addr: Address) {
if self.registers.status.contains(PS_NEGATIVE) {
self.registers.program_counter = addr;