Beispiel #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());
     }
 }
Beispiel #2
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     if (firstVal.ReadParamFromMemory() == secondVal.ReadParamFromMemory())
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 1);
     }
     else
     {
         computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), 0);
     }
 }
Beispiel #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());
 }
Beispiel #4
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     computer.WriteOutputData(targetData.ReadParamFromMemory());
     computer.PauseProgram();
 }
Beispiel #5
0
 protected override void ProcessOpCode(IntComputer computer)
 {
     result = firstVal.ReadParamFromMemory() + secondVal.ReadParamFromMemory();
     computer.ReplaceMemoryAtAddress(thirdVal.GetMemoryWriteAddressFromParameter(), result);
 }