Exemplo n.º 1
0
        protected override void ExecuteImpl(Mode[] modes, BigInteger[] p)
        {
            var newPointer = (p[0] == 0)
               ? p[1]
               : Sm.GetPointer() + 3;

            Sm.SetPointer(newPointer);
        }
Exemplo n.º 2
0
        protected override void ExecuteImpl(Mode[] modes, BigInteger[] p)
        {
            var input = Vm.GetInput(out var hasInput);

            if (hasInput)
            {
                Sm.SetValueOffset(1, modes, input);
                Sm.SetPointer(Sm.GetPointer() + 2);
            }

            Vm.PauseAwaitingInput();
        }
Exemplo n.º 3
0
 protected override void ExecuteImpl(Mode[] modes, BigInteger[] p)
 {
     Sm.SetValueOffset(3, modes, p[0] * p[1]);
     Sm.SetPointer(Sm.GetPointer() + 4);
 }
Exemplo n.º 4
0
 protected override void ExecuteImpl(Mode[] modes, BigInteger[] p)
 {
     Sm.SetRelativeBasePointer(p[0]);
     Sm.SetPointer(Sm.GetPointer() + 2);
 }
Exemplo n.º 5
0
 protected override void ExecuteImpl(Mode[] modes, BigInteger[] p)
 {
     Vm.SetOutput(p[0]);
     Vm.PauseHasOutput();
     Sm.SetPointer(Sm.GetPointer() + 2);
 }