Bitwise operators



      iand      inot      ior      ishl
      ishr      ishr_un      ixor      land
      lnot      lor      lshl      lshr
      lshr_un      lxor  


 iand 
  ·  OperationBitwise AND int32
  ·  Format
iand
  ·  Direct Format
{iand}
  ·  Forms iand = 101 (0x65)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int32. The int32 result is value1 & value2. The result is pushed onto the stack.
   · Notes The iand instruction can also be used to AND values of type uint32.


 inot 
  ·  OperationBitwise NOT int32
  ·  Format
inot
  ·  Direct Format
{inot}
  ·  Forms inot = 104 (0x68)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is ~value. The result is pushed onto the stack.
   · Notes The inot instruction can also be used to NOT values of type uint32.


 ior 
  ·  OperationBitwise OR int32
  ·  Format
ior
  ·  Direct Format
{ior}
  ·  Forms ior = 102 (0x66)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int32. The int32 result is value1 | value2. The result is pushed onto the stack.
   · Notes The ior instruction can also be used to OR values of type uint32.


 ishl 
  ·  OperationLeft shift int32
  ·  Format
ishl
  ·  Direct Format
{ishl}
  ·  Forms ishl = 105 (0x69)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as the types int32 and uint32 respectively. The int32 result is (value1 << (value2 & 0x1F)). Bits that are shifted out the top of value1 are discarded. The result is pushed onto the stack.
   · Notes The ishl instruction can also be used to shift values of type uint32.


 ishr 
  ·  OperationRight arithmetic shift int32
  ·  Format
ishr
  ·  Direct Format
{ishr}
  ·  Forms ishr = 106 (0x6A)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as the types int32 and uint32 respectively. The int32 result is (value1 >> (value2 & 0x1F)). The top-most bit of value1 is used to fill new bits shifted in from the top. The result is pushed onto the stack.


 ishr_un 
  ·  OperationRight unsigned shift uint32
  ·  Format
ishr_un
  ·  Direct Format
{ishr_un}
  ·  Forms ishr_un = 107 (0x6B)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type uint32. The uint32 result is (value1 >> (value2 & 0x1F)). Zeroes are used to fill new bits shifted in from the top. The result is pushed onto the stack.


 ixor 
  ·  OperationBitwise XOR int32
  ·  Format
ixor
  ·  Direct Format
{ixor}
  ·  Forms ixor = 103 (0x67)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int32. The int32 result is value1 ^ value2. The result is pushed onto the stack.
   · Notes The ixor instruction can also be used to XOR values of type uint32.


 land 
  ·  OperationBitwise AND int64
  ·  Format
land
  ·  Direct Format
{land}
  ·  Forms land = 108 (0x6C)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int64. The int64 result is value1 & value2. The result is pushed onto the stack.
   · Notes The land instruction can also be used to AND values of type uint64.


 lnot 
  ·  OperationBitwise NOT int64
  ·  Format
lnot
  ·  Direct Format
{lnot}
  ·  Forms lnot = 111 (0x6F)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64. The int64 result is ~value. The result is pushed onto the stack.
   · Notes The lnot instruction can also be used to NOT values of type uint64.


 lor 
  ·  OperationBitwise OR int64
  ·  Format
lor
  ·  Direct Format
{lor}
  ·  Forms lor = 109 (0x6D)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int64. The int64 result is value1 | value2. The result is pushed onto the stack.
   · Notes The lor instruction can also be used to OR values of type uint64.


 lshl 
  ·  OperationLeft shift int64
  ·  Format
lshl
  ·  Direct Format
{lshl}
  ·  Forms lshl = 112 (0x70)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as the types int64 and uint32 respectively. The int64 result is (value1 << (value2 & 0x3F)). Bits that are shifted out the top of value1 are discarded. The result is pushed onto the stack.
   · Notes The lshl instruction can also be used to shift values of type uint64.


 lshr 
  ·  OperationRight arithmetic shift int64
  ·  Format
lshr
  ·  Direct Format
{lshr}
  ·  Forms lshr = 113 (0x71)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as the types int64 and uint32 respectively. The int64 result is (value1 >> (value2 & 0x3F)). The top-most bit of value1 is used to fill new bits shifted in from the top. The result is pushed onto the stack.


 lshr_un 
  ·  OperationRight unsigned shift uint64
  ·  Format
lshr_un
  ·  Direct Format
{lshr_un}
  ·  Forms lshr_un = 114 (0x72)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as the types uint64 and uint32 respectively. The uint64 result is (value1 >> (value2 & 0x3F)). Zeroes are used to fill new bits shifted in from the top. The result is pushed onto the stack.


 lxor 
  ·  OperationBitwise XOR int64
  ·  Format
lxor
  ·  Direct Format
{lxor}
  ·  Forms lxor = 110 (0x6E)
  ·  Stack..., value1, value2 => ..., result
   · Description Both value1 and value2 are popped from the stack as type int64. The int64 result is value1 ^ value2. The result is pushed onto the stack.
   · Notes The lxor instruction can also be used to XOR values of type uint64.


Copyright © Southern Storm Software Pty Ltd 2002
Licensed under GNU FDL