mirror of
https://github.com/mre/mos6502.git
synced 2025-01-08 16:30:04 +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) {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user