Example #1
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     if (firstVal.ReadParamFromMemory() != 0)
     {// just setting memoryPointer so we don't need to use the specialty writy addresses
         computer.SetMemoryPointer(secondVal.ReadParamFromMemory());
     }
 }
Example #2
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     if (firstVal.ReadParamFromMemory() == secondVal.ReadParamFromMemory())
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 1);
     }
     else
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 0);
     }
 }
Example #3
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     // this isn't writing to a memory address so we just read from memory
     computer.AdjustRelativeBase(sourceData.ReadParamFromMemory());
 }
Example #4
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     computer.WriteOutputData(targetData.ReadParamFromMemory());
     computer.PauseProgram();
 }
Example #5
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     result = firstVal.ReadParamFromMemory() + secondVal.ReadParamFromMemory();
     computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), result);
 }