Exemplo n.º 1
0
        public void Execute_IsNotLessThan()
        {
            reg[17] = 0x1;
            reg[18] = 0x0;
            target  = new SltInstruction(16, 17, 18);

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

            Assert.AreEqual(0x0, reg[16]);
            Assert.AreEqual(0x4, pc);
        }
Exemplo n.º 2
0
        public void Execute_IsLessThan_SignedComparison()
        {
            reg[17] = 0xFFFFFFFF;
            reg[18] = 0x00000000;
            target  = new SltInstruction(16, 17, 18);

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

            Assert.AreEqual(0x1, reg[16]);
            Assert.AreEqual(0x4, pc);
        }
Exemplo n.º 3
0
        public void ToString_Formatted()
        {
            target = new SltInstruction(16, 17, 18);

            Assert.AreEqual("SLT $s0, $s1, $s2", target.ToString());
        }