public void Emu6502_ldy_imm() { Given_Code(m => { m.Ldy(m.i8(0xC4)); // A0 C4 ldy #$C4 }); emu.Start(); Assert.AreEqual(0xC4, emu.ReadRegister(Registers.y)); }
public void Emu6502_asl_adc_overflow() { Given_Code(m => { m.Adc(m.i8(0x1)); }); emu.WriteRegister(Registers.a, 0x7F); emu.WriteRegister(Registers.p, 0); emu.Start(); Assert.AreEqual(0x80, emu.ReadRegister(Registers.a)); Assert.AreEqual(0xC0, emu.ReadRegister(Registers.p)); }