public void TestShiftLeftToAccumulator() { Cpu cpu = new Cpu(); cpu.ImpliedAddress = true; cpu.Fetched = 0x81; Assert.Equal(0, InstructionSet.ASL(cpu)); Assert.True(cpu.GetFlag(Flags.C)); Assert.Equal(0x02, cpu.A); }
public void TestShiftLeftToRam() { Ram ram = new Ram(0xFF); DataBus bus = new DataBus(0xFF); Cpu cpu = new Cpu(bus); cpu.Address = 0x0004; cpu.ImpliedAddress = false; cpu.Fetched = 0x81; Assert.Equal(0, InstructionSet.ASL(cpu)); Assert.True(cpu.GetFlag(Flags.C)); Assert.Equal(0x02, ram.ReadByte(0x0004)); }