public void SetUp() { Instruction instr1 = new AddInstruction(2, 3, 4); Instruction instr2 = new LuiInstruction(5, 0xFFFF); Instruction[] instructions = { instr1, instr2 }; target = new InstructionMemory(instructions); }
public void Execute_ImmediateInUpperBits() { target = new LuiInstruction(8, 0xABCD); target.Execute(ref pc, mem, reg); Assert.AreEqual(0xABCD0000, reg[8]); Assert.AreEqual(0x00000004, pc); }
public void ToString_Formatted() { target = new LuiInstruction(8, 0xABCD); Assert.AreEqual("LUI $t0, 0xABCD", target.ToString()); }