public static EXECUTION_RESULT?VERIFY(ref ExecutionStack stack) { if (!stack.Any()) { return(EXECUTION_RESULT.INVALID_STACK); } else if (!stack.PopBool()) { return(EXECUTION_RESULT.FAILURE); } else { return(null); } }
public static void NOT(ref ExecutionStack stack) => stack.Push((stack.PeekByte() <= 1) ? !stack.PopBool() : false);
public static void OR(ref ExecutionStack stack) => stack.Push(stack.PopBool() || stack.PopBool());
public static void AND(ref ExecutionStack stack) => stack.Push(stack.PopBool() && stack.PopBool());