コード例 #1
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsExecutionToken(Forth f)
 {
     bool b = (f.dStack.Top is ExecutionToken);
     f.dStack.Pop();
     f.PushBool(b);
 }
コード例 #2
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void Not(Forth f)
 {
     bool b = f.PopBool();
     f.PushBool(!b);
 }
コード例 #3
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsLong(Forth f)
 {
     bool b = (f.dStack.Top is long);
     f.dStack.Pop();
     f.PushBool(b);
 }
コード例 #4
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsNotGreaterThanUnsigned(Forth f)
 {
     ulong b = f.PopUInt64();
     ulong a = f.PopUInt64();
     f.PushBool(a <= b);
 }
コード例 #5
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsNotLessThanUnsigned(Forth f)
 {
     ulong b = f.PopUInt64();
     ulong a = f.PopUInt64();
     f.PushBool(a >= b);
 }
コード例 #6
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsNotGreaterThan(Forth f)
 {
     long b = f.PopInt64();
     long a = f.PopInt64();
     f.PushBool(a <= b);
 }
コード例 #7
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsNotLessThan(Forth f)
 {
     long b = f.PopInt64();
     long a = f.PopInt64();
     f.PushBool(a >= b);
 }
コード例 #8
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void Equals(Forth f)
 {
     ulong b = f.PopUInt64();
     ulong a = f.PopUInt64();
     f.PushBool(a == b);
 }
コード例 #9
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void DoesNotEqual(Forth f)
 {
     ulong b = f.PopUInt64();
     ulong a = f.PopUInt64();
     f.PushBool(a != b);
 }
コード例 #10
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void Within(Forth f)
 {
     long end = f.PopInt64();
     long begin = f.PopInt64();
     long mid = f.PopInt64();
     f.PushBool(Within(begin, mid, end));
 }
コード例 #11
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void False(Forth f)
 {
     f.PushBool(false);
 }
コード例 #12
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void True(Forth f)
 {
     f.PushBool(true);
 }
コード例 #13
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsRealMemory(Forth f)
 {
     object obj = f.dStack.Pop();
     f.PushBool(obj is MemoryAccessor);
 }
コード例 #14
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void IsBytes(Forth f)
 {
     object obj = f.dStack.Pop();
     f.PushBool(obj is byte[]);
 }