public override Structure CallWithArgsPushedAlready() { int throwAway = OpcodeCall.StaticExecute(Cpu, true, Name, true); // throwAway will be -1 for cases where it's a builtin function. // and the return value will be left atop the stack by StaticExecute. return(new KOSPassThruReturn()); }
public override Structure Call() { int absoluteJumpTo = OpcodeCall.StaticExecute(Cpu, false, "", true); if (absoluteJumpTo >= 0) { Cpu.InstructionPointer = absoluteJumpTo - 1; // -1 because it increments by 1 automatically between instructions. } // Remember this is just a special flag telling OpcodeCall to never place // this suffix's C# delegate return value on the stack. It's like saying // "even more void that void", because normally even a void suffix gets a // dummy return value. This says to not even do that - just offload the // responsibility for pushing a return value onto the user code that is // about to be jumped into. return(new KOSPassThruReturn()); }