Exemplo n.º 1
0
        public void Execute_NotLessThanImmediate()
        {
            reg[8] = 0x00000001;
            target = new SltiInstruction(9, 8, 0x0000);

            target.Execute(ref pc, mem, reg);

            Assert.AreEqual(0x00000000, reg[9]);
            Assert.AreEqual(0x00000004, pc);
        }
Exemplo n.º 2
0
        public void Execute_LessThanImmediate_SignedComparison()
        {
            reg[8] = 0xFFFFFFFF;
            target = new SltiInstruction(9, 8, 0x0000);

            target.Execute(ref pc, mem, reg);

            Assert.AreEqual(0x00000001, reg[9]);
            Assert.AreEqual(0x00000004, pc);
        }