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

Rename the Status register sign to negative.

This commit is contained in:
Andrew Keeton 2014-09-28 18:01:47 -04:00
parent b546c62946
commit 0a1d6c47d0
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ impl Machine {
self.registers.accumulator = a_new; self.registers.accumulator = a_new;
self.registers.status.carry = BitFlag::new(did_carry); self.registers.status.carry = BitFlag::new(did_carry);
self.registers.status.zero = BitFlag::new(is_zero); 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); self.registers.status.overflow = BitFlag::new(did_overflow);
} }
} }

View File

@ -36,7 +36,7 @@ pub struct Status {
pub brk: BitFlag, pub brk: BitFlag,
pub unused: BitFlag, pub unused: BitFlag,
pub overflow: BitFlag, pub overflow: BitFlag,
pub sign: BitFlag pub negative: BitFlag
} }
impl Status { impl Status {
@ -48,7 +48,7 @@ impl Status {
| self.brk.to_bit() << 4 | self.brk.to_bit() << 4
| self.unused.to_bit() << 5 | self.unused.to_bit() << 5
| self.overflow.to_bit() << 6 | self.overflow.to_bit() << 6
| self.sign.to_bit() << 7 | self.negative.to_bit() << 7
} }
pub fn new() -> Status { pub fn new() -> Status {
@ -61,7 +61,7 @@ impl Status {
brk: Off, brk: Off,
unused: On, unused: On,
overflow: Off, overflow: Off,
sign: Off negative: Off
} }
} }
} }