mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 22:51:26 +00:00
separate unit test for decimal sbc should set carry
This commit is contained in:
parent
ad40c72dfe
commit
b39a67b0a1
@ -809,7 +809,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn decimal_subtract_test() {
|
fn decimal_subtract_test() {
|
||||||
let mut cpu = CPU::new();
|
let mut cpu = CPU::new();
|
||||||
cpu.registers.status.or(Status::PS_DECIMAL_MODE);
|
cpu.registers.status.or(Status::PS_DECIMAL_MODE | Status::PS_CARRY);
|
||||||
|
cpu.registers.accumulator = 0;
|
||||||
|
|
||||||
cpu.subtract_with_carry(0x48);
|
cpu.subtract_with_carry(0x48);
|
||||||
assert_eq!(cpu.registers.accumulator as u8, 0x52);
|
assert_eq!(cpu.registers.accumulator as u8, 0x52);
|
||||||
|
Loading…
Reference in New Issue
Block a user