1
0
mirror of https://github.com/mre/mos6502.git synced 2024-12-01 11:51:51 +00:00

Add BCS to execute_instruction().

This commit is contained in:
Andrew Keeton 2014-11-06 19:42:08 -05:00
parent da6a28f639
commit 59168cbbe4

View File

@ -116,6 +116,11 @@ impl Machine {
self.branch_if_carry_clear(addr); self.branch_if_carry_clear(addr);
} }
(instruction::BCS, instruction::UseRelative(rel)) => {
let addr = self.registers.program_counter
+ AddressDiff(rel as i32);
self.branch_if_carry_set(addr);
}
(instruction::BIT, instruction::UseAddress(addr)) => { (instruction::BIT, instruction::UseAddress(addr)) => {
let a: u8 = self.registers.accumulator as u8; let a: u8 = self.registers.accumulator as u8;