Exemplo n.º 1
0
        public void C6502_Execute_STY_Absolute()
        {
            // Store value of Y (0xFF) in #$DEAD.
            IC6502 c = CreateTestCPU();

            c.Memory[0x00] = 0xA0;
            c.Memory[0x01] = 0xFF;
            c.Memory[0x02] = 0x8C;
            c.Memory[0x03] = 0xAD;
            c.Memory[0x04] = 0xDE;

            c.Step(2);
            Assert.AreEqual(c.State.RegY, 0xFF, "Loading value of X (0xFF) into memory @ address 0xDEAD.");
        }
Exemplo n.º 2
0
        public void C6502_Execute_STA_Absolute()
        {
            // Store value of A (0xFF) in #$DEAD.
            IC6502 c = CreateTestCPU();

            c.Memory[0x00] = 0xA9;
            c.Memory[0x01] = 0xFF;
            c.Memory[0x02] = 0x8D; // lol smiley face.
            c.Memory[0x03] = 0xAD;
            c.Memory[0x04] = 0xDE;

            c.Step(2);
            Assert.AreEqual(c.State.RegA, 0xFF, "Loading value of A (0xFF) into memory @ address 0xDEAD.");
        }