[TestMethod]
public void TestLDA()
{
CPU6502 cpu = new CPU6502();
Assert.AreEqual<byte>(cpu.Reg_A, 0x00); // Accumulator should be 0x00 on initialisation
// Build a ram_basic program to load the accumulator with 255
cpu.Ram[0] = 0xA9; // LDA
cpu.Ram[1] = 0xFF; // immediate mode 255
// Run the program (The PC is initialised to 0x00)
cpu.Run();
// Check we have loaded the accumulator
Assert.AreEqual<byte>(cpu.Reg_A, 0xFF);
}