mirror of
https://github.com/mre/mos6502.git
synced 2024-11-30 20:51:21 +00:00
Add branch_if_overflow_set().
This commit is contained in:
parent
c00e170285
commit
7e0a086a1d
@ -607,6 +607,12 @@ impl Machine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn branch_if_overflow_set(&mut self, addr: Address) {
|
||||||
|
if self.registers.status.contains(PS_OVERFLOW) {
|
||||||
|
self.registers.program_counter = addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn push_on_stack(&mut self, val: u8) {
|
fn push_on_stack(&mut self, val: u8) {
|
||||||
let addr = self.registers.stack_pointer.to_address();
|
let addr = self.registers.stack_pointer.to_address();
|
||||||
self.memory.set_byte(addr, val);
|
self.memory.set_byte(addr, val);
|
||||||
|
Loading…
Reference in New Issue
Block a user