Difference between revisions of "Template:LSO Bytecodes/operators"

From Second Life Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
<noinclude>{| {{Prettytable}}</noinclude>
<noinclude>{| {{Prettytable}}</noinclude>
{{!}}-
{{!}} CAST
{{!}} {{LSL Hex|0xA0}}
{{!}} Pop type.Left, convert Left to type.Right and push the result onto the stack.
{{!}} type
{{!}}-
{{!}} NEG
{{!}} {{LSL Hex|0x80}}
{{!}} Pop type.Right, push result of (-Right) onto the stack.
{{!}} type
{{!}}-
{{!}}-
{{!}} ADD
{{!}} ADD
Line 75: Line 85:
{{!}} {{LSL Hex|0x7F}}
{{!}} {{LSL Hex|0x7F}}
{{!}} Pop dword (Right) then dword (Left), push result of (Left &#124;&#124; Right) onto the stack.
{{!}} Pop dword (Right) then dword (Left), push result of (Left &#124;&#124; Right) onto the stack.
{{!}}-
{{!}} NEG
{{!}} {{LSL Hex|0x80}}
{{!}} Pop type.Right, push result of (-Right) onto the stack.
{{!}} type
{{!}}-
{{!}}-
{{!}} BITNOT
{{!}} BITNOT
Line 88: Line 93:
{{!}} {{LSL Hex|0x82}}
{{!}} {{LSL Hex|0x82}}
{{!}} Pop dword (Right), push result of (!Right) onto the stack.
{{!}} Pop dword (Right), push result of (!Right) onto the stack.
{{!}}-
{{!}} CAST
{{!}} {{LSL Hex|0xA0}}
{{!}} Pop type.Left, convert Left to type.Right and push the result onto the stack.
{{!}} type
{{!}}-
{{!}}-
{{!}} SHL
{{!}} SHL

Latest revision as of 15:39, 27 November 2007

CAST 0xA0 Pop type.Left, convert Left to type.Right and push the result onto the stack. type
NEG 0x80 Pop type.Right, push result of (-Right) onto the stack. type
ADD 0x70 Pop type.Right then type.Left, push result of (Left + Right) onto the stack. type
SUB 0x71 Pop type.Right then type.Left, push result of (Left - Right) onto the stack. type
MUL 0x72 Pop type.Right then type.Left, push result of (Left * Right) onto the stack. type
DIV 0x73 Pop type.Right then type.Left, push result of (Left / Right) onto the stack. type
MOD 0x74 Pop type.Right then type.Left, push result of (Left % Right) onto the stack. type
EQ 0x75 Pop type.Right then type.Left, push result of (Left == Right) onto the stack. type
NEQ 0x76 Pop type.Right then type.Left, push result of (Left != Right) onto the stack. type
LEQ 0x77 Pop type.Right then type.Left, push result of (Left <= Right) onto the stack. type
GEQ 0x78 Pop type.Right then type.Left, push result of (Left >= Right) onto the stack. type
LESS 0x79 Pop type.Right then type.Left, push result of (Left < Right) onto the stack. type
GREATER 0x7A Pop type.Right then type.Left, push result of (Left > Right) onto the stack. type
BITAND 0x7B Pop dword (Right) then dword (Left), push result of (Left & Right) onto the stack.
BITOR 0x7C Pop dword (Right) then dword (Left), push result of (Left | Right) onto the stack.
BITXOR 0x7D Pop dword (Right) then dword (Left), push result of (Left ^ Right) onto the stack.
BOOLAND 0x7E Pop dword (Right) then dword (Left), push result of (Left && Right) onto the stack.
BOOLOR 0x7F Pop dword (Right) then dword (Left), push result of (Left || Right) onto the stack.
BITNOT 0x81 Pop dword (Right), push result of (~Right) onto the stack.
BOOLNOT 0x82 Pop dword (Right), push result of (!Right) onto the stack.
SHL 0xE0 Pop dword (Right) then dword (Left), push result of (Left << Right) onto the stack.
SHR 0xE1 Pop dword (Right) then dword (Left), push result of (Left >> Right) onto the stack.