public static void And(Forth f) { ulong b = f.PopUInt64(); ulong a = f.PopUInt64(); f.PushUInt64(a & b); }
public static void Xor(Forth f) { ulong b = f.PopUInt64(); ulong a = f.PopUInt64(); f.PushUInt64(a ^ b); }
public static void UnsignedDivide(Forth f) { ulong b = f.PopUInt64(); ulong a = f.PopUInt64(); f.PushUInt64(unchecked(a / b)); }
public static void UnsignedModulus(Forth f) { ulong b = f.PopUInt64(); ulong a = f.PopUInt64(); f.PushUInt64(unchecked(a % b)); }
public static void Invert(Forth f) { ulong u = f.PopUInt64(); f.PushUInt64(~u); }
public static void UnsignedMax(Forth f) { ulong b = f.PopUInt64(); ulong a = f.PopUInt64(); f.PushUInt64((a > b) ? a : b); }
public static void RShift(Forth f) { ulong shiftCount = f.PopUInt64(); ulong value = f.PopUInt64(); if (shiftCount > 63) { f.PushUInt64(0ul); } else { f.PushUInt64(value >> (int)shiftCount); } }
public static void ZeroExtendInt32(Forth f) { ulong value = f.PopUInt64(); value &= 0xFFFFFFFFul; f.PushUInt64(value); }
public static void SignExtendInt32(Forth f) { ulong value = f.PopUInt64(); if ((value & 0x80000000ul) != 0) value |= 0xFFFFFFFF80000000ul; else value &= 0x7FFFFFFFul; f.PushUInt64(value); }