From 59168cbbe449dec96b369f075569c69f7912f533 Mon Sep 17 00:00:00 2001 From: Andrew Keeton Date: Thu, 6 Nov 2014 19:42:08 -0500 Subject: [PATCH] Add BCS to execute_instruction(). --- src/machine.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/machine.rs b/src/machine.rs index 039fa6f..1b90a47 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -116,6 +116,11 @@ impl Machine { 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)) => { let a: u8 = self.registers.accumulator as u8;