From 0a1d6c47d0f841952ca1a3b3a4cb03d9cab202b0 Mon Sep 17 00:00:00 2001 From: Andrew Keeton Date: Sun, 28 Sep 2014 18:01:47 -0400 Subject: [PATCH] Rename the Status register sign to negative. --- 6502emu/src/machine.rs | 2 +- 6502emu/src/registers.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/6502emu/src/machine.rs b/6502emu/src/machine.rs index da2a6df..8757dbc 100644 --- a/6502emu/src/machine.rs +++ b/6502emu/src/machine.rs @@ -60,7 +60,7 @@ impl Machine { self.registers.accumulator = a_new; self.registers.status.carry = BitFlag::new(did_carry); self.registers.status.zero = BitFlag::new(is_zero); - self.registers.status.sign = BitFlag::new(is_negative); + self.registers.status.negative = BitFlag::new(is_negative); self.registers.status.overflow = BitFlag::new(did_overflow); } } \ No newline at end of file diff --git a/6502emu/src/registers.rs b/6502emu/src/registers.rs index c9b5e39..9bacf20 100644 --- a/6502emu/src/registers.rs +++ b/6502emu/src/registers.rs @@ -36,7 +36,7 @@ pub struct Status { pub brk: BitFlag, pub unused: BitFlag, pub overflow: BitFlag, - pub sign: BitFlag + pub negative: BitFlag } impl Status { @@ -48,7 +48,7 @@ impl Status { | self.brk.to_bit() << 4 | self.unused.to_bit() << 5 | self.overflow.to_bit() << 6 - | self.sign.to_bit() << 7 + | self.negative.to_bit() << 7 } pub fn new() -> Status { @@ -61,7 +61,7 @@ impl Status { brk: Off, unused: On, overflow: Off, - sign: Off + negative: Off } } }