Exemple #1
0
 public void Ifg_FirstOperandNotGreater_PCSkipsNextInstructionAndOperands()
 {
     var prev = new MutableState()
         .Set(Register.A, 1).Set(Register.B, 1)
         .Set((ushort)0, 0x7C02)
         .Set((ushort)1, 0x002A);
     var state = new Ifg(new Reg(Register.A), new Reg(Register.B)).Apply(prev);
     Assert.AreEqual(2, state.Get(Register.PC));
 }
Exemple #2
0
 public void Ifg_FirstOperandGreater_PCIsNotUpdated()
 {
     var prev = new MutableState().Set(Register.A, 2).Set(Register.B, 1);
     var state = new Ifg(new Reg(Register.A), new Reg(Register.B)).Apply(prev);
     Assert.AreEqual(0, state.Get(Register.PC));
 }