Exemplo n.º 1
0
 public void Ifn_RegisterOperandsAreNotEqual_PCIsNotUpdated()
 {
     var prev = new MutableState().Set(Register.A, 1).Set(Register.B, 2);
     var state = new Ifn(new Reg(Register.A), new Reg(Register.B)).Apply(prev);
     Assert.AreEqual(0, state.Get(Register.PC));
 }
Exemplo n.º 2
0
 public void Ifn_RegisterOperandsAreEqual_PCSkipsNextInstructionAndOperands()
 {
     var prev = new MutableState()
         .Set(Register.A, 1).Set(Register.B, 1)
         .Set((ushort)0, 0x7C02)
         .Set((ushort)1, 0x002A);
     var state = new Ifn(new Reg(Register.A), new Reg(Register.B)).Apply(prev);
     Assert.AreEqual(2, state.Get(Register.PC));
 }