Exemple #1
0
 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);
     }
 }
Exemple #2
0
 public static void NOT(ref ExecutionStack stack)
 => stack.Push((stack.PeekByte() <= 1) ? !stack.PopBool() : false);
Exemple #3
0
 public static void OR(ref ExecutionStack stack)
 => stack.Push(stack.PopBool() || stack.PopBool());
Exemple #4
0
 public static void AND(ref ExecutionStack stack)
 => stack.Push(stack.PopBool() && stack.PopBool());