예제 #1
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     if (firstVal.ReadParamFromMemory() == secondVal.ReadParamFromMemory())
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 1);
     }
     else
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 0);
     }
 }
예제 #2
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     result = firstVal.ReadParamFromMemory() + secondVal.ReadParamFromMemory();
     computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), result);
 }