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:
parent
eb5c3f3c2a
commit
da6a28f639
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user