Exemplo n.º 1
0
        public void ReturnsCorrectAddress()
        {
            byte[] input = { 0xB0, 0x0A };
            machine.CPU.Memory.Set(0x0AB0, 0x0F);
            machine.CPU.Memory.Set(0x0AB1, 0x0E);

            int res = attr.Resolve(machine.CPU, ref input);

            Assert.Equal(0x0E0F, res);
        }
Exemplo n.º 2
0
        public void ReturnsCorrectAddress(
            byte in1,
            byte in2,
            int memLoc1,
            int memLoc2
            )
        {
            byte[] input = { in1, in2 };
            machine.CPU.Memory.Set(memLoc1, 0x0F);
            machine.CPU.Memory.Set(memLoc2, 0x0E);

            int res = attr.Resolve(machine.CPU, ref input);

            Assert.Equal(0x0E0F, res);
        }