Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0x00 - nop (no operation, does nothing)
- 0x01 - Add (Add top two stack items, store result on stack)
- 0x02 - Sub (Second stack item - top stack item, store result on stack)
- 0x03 - Mult (Mult top two stack items, store result on stack)
- 0x04 - Div (Second stack item divided by top item, store result on stack, zero throws an error)
- 0x05 - Mod (Gets the mod of top two items on stack, or the remainder when divided, stores result on stack)
- 0x06 - Not (Bitwise Not, store result on stack)
- 0x07 - Neg (Bitwise Neg, store result on stack)
- 0x08 - CmpEQ (Check if top two items on stack are equal, store result bool on stack)
- 0x09 - CmpNE (Check if top two items on stack are not equal, store result bool on stack)
- 0x0A - CmpGT (Check if second item is greater than top item, store result bool on stack)
- 0x0B - CmpGE (Check if second item is greater than or equal to top item, store result bool on stack)
- 0x0C - CmpLT (Check if second item is less than top item, store result bool on stack)
- 0x0D - CmpLE (Check if second item is less than or equal to top item, store result bool on stack)
- 0x0E - fAdd (Add top two floats on stack together, store result on stack)
- 0x0F - fSub (Subtract top float from second float, store result on stack)
- 0x10 - fMul (Multiply top two floats on stack, store result on stack)
- 0x11 - fDiv (Second float divided by first float, store result on stack)
- 0x12 - fMod (Gets the mod of top two floats on stack, store result on stack)
- 0x13 - fNeg (Bitwise Neg on float, store result on stack)
- 0x14 - fCmpEQ (Check if top two floats on stack are equal, store result bool on stack)
- 0x15 - FCmpNE (Check if top two floats on stack are not equal, store result bool on stack)
- 0x16 - FCmpGT (Check if second float is greater than top float, store result bool on stack)
- 0x17 - FCmpGE (Check if second float is greater than or equal to top float, store result bool on stack)
- 0x18 - FCmpLT (Check if second float is less than top float, store result bool on stack)
- 0x19 - FCmpLE (Check if second float is less than or equal to top float, store result bool on stack)
- 0x1A - vAdd (Add top two vectors, store result on stack)
- 0x1B - vSub (Subtract top vector from second vector, store result on stack)
- 0x1C - vMul (Multiply top two vectors, store result on stack)
- 0x1D - vDiv (Second stack vector divided by top stack vector, store result on stack)
- 0x1E - vNeg (Bitwise negate on vector, store result on stack)
- 0x1F - And (Bitwise And on top stack item, store result on stack)
- 0x20 - Or (Bitwise Or on top stack item, store result on stack)
- 0x21 - Xor (Bitwise Xor on top stack item, store result on stack)
- 0x22 - ItoF (Convert top integer to float, store result on stack)
- 0x23 - FtoI (Convert top float to integer, store result on stack)
- 0x24 - Dup2 (Read top stack item, duplicate and store on stack twice, so three of them total)
- 0x25 - Push1 (Push 1 byte onto the stack, max size of 255)
- 0x26 - Push2 (Push 2 separate 1 byte values onto the stack, each with a max size of 255)
- 0x27 - Push3 (Push 3 separate 1 byte values onto the stack, each with a max size of 255)
- 0x28 - Push (Push 32 bit signed int onto the stack)
- 0x29 - fPush (Push 32 bit float onto the stack)
- 0x2A - Dup (Duplicate top item on stack, store back on stack. Two of them on top at the end)
- 0x2B - Drop (Drop top item on stack)
- 0x2C - CallNative (Call a Native Function from the natives block. Will take items off the stack and store items on the stack as required by the function)
- 0x2D - Function (Begin an internal function. Return address is stored on top of stack. Bytes after are 8 bits for how many items to take off stack and pass to function (params), 8 bit for how many local function vars to create, 16 bit related to c++ function name, just leave it null)
- 0x2E - Return (Return from internal function. Bytes after are 8 bits for how many params you originally passed to the function and another 8 bit for how many items to return from the function, or store back on the stack)
- 0x2F - pGet (get value at location pointed to by top item on stack, store on stack)
- 0x30 - pSet (store second item on stack at location pointed to by first item on stack)
- 0x31 - pPeekSet (peek at top item, then store top item at location pointed to by second item)
- 0x32 - ToStack (unknown...)
- 0x33 - FromStack (unknown...)
- 0x34 - ArrayGetP1 (unknown...)
- 0x35 - ArrayGet1 (unknown...)
- 0x36 - ArraySet1 (unknown...)
- 0x37 - pFrame1 (Get pointer to a frame var. Frame var number is one byte, can be up to 255)
- 0x38 - getF1 (Get frame var value. Frame var number is one byte, can be up to 255)
- 0x39 - setF1 (Set frame var value. Frame var number is one byte, can be up to 255)
- 0x3A - pStatic1 (Get pointer to a static var. Static var number is one byte, can be up to 255)
- 0x3B - StaticGet1 (Get static value. Static number is one byte, can be up to 255)
- 0x3C - StaticSet1 (Set static value. Static number is one byte, can be up to 255)
- 0x3D - Add1 (Add top stack item to the value pushed by this opcode. Store result on stack)
- 0x3E - Mult1 (Multiply top item on stack to the value pushed by this opcode. Store result on stack)
- 0x3F - GetStackImmediateP (unknown...)
- 0x40 - GetImmediateP1 (unknown...)
- 0x41 - GetImmediate1 (unknown...)
- 0x42 - SetImmediate1 (unknown...)
- 0x43 - PushS (Push a 16 bit unsigned int onto the stack)
- 0x44 - Add2 (Add top stack item to the value pushed by this opcode. Store result on stack. Value pushed can be up to 2 bytes or 65,535)
- 0x45 - Mult2 (Multiply top stack item to the value pushed by this opcode. Store result on stack. Value pushed can be up to 2 bytes or 65,535)
- 0x46 - GetImmediateP2 (unknown...)
- 0x47 - GetImmediate2 (unknown...)
- 0x48 - SetImmediate2 (unknown...)
- 0x49 - ArrayGetP2 (unknown...)
- 0x4A - ArrayGet2 (unknown...)
- 0x4B - ArraySet2 (unknown...)
- 0x4C - pFrame2 (Get pointer to a frame var. Frame var number can be up to 2 bytes or 65,535)
- 0x4D - getF2 (Get frame var value. Frame var number can be up to 2 bytes or 65,535)
- 0x4E - setF2 (Set frame var value. Frame var number can be up to 2 bytes or 65,535)
- 0x4F - pStatic2 (Get pointer to a static. Static number can be up to 2 bytes or 65,535)
- 0x50 - StaticGet2 (Get static value. Static number can be up to 2 bytes or 65,535)
- 0x51 - StaticSet2 (Set static value. Static number can be up to 2 bytes or 65,535)
- 0x52 - pGlobal2 (Get pointer to a global. Global number can be up to 2 bytes or 65,535)
- 0x53 - globalGet2 (Get global value. Static number can be up to 2 bytes or 65,535)
- 0x54 - globalSet2 (Set global value. Static number can be up to 2 bytes or 65,535)
- 0x55 - Jump (Jump to location inside the function. Offset is based off the byte after the opcode and can go backwards (negative offset)
- 0x56 - JumpFalse (Jump if top item on stack is 0)
- 0x57 - JumpNE (Jump if top two items on stack are not equal)
- 0x58 - JumpEQ (Jump if top two items on stack are equal)
- 0x59 - JumpLE (Jump if second item is less than or equal to top item)
- 0x5A - JumpLT (Jump if second item is less than top item)
- 0x5B - JumpGE (Jump if second item is greater than or equal to top item)
- 0x5C - JumpGT (Jump if second item is greater than top item)
- 0x5D - Call (Call to a different function. Offset is based from the start of the script)
- 0x5E - pGlobal3 (Pointer to a global variable. Global var number can be up to 3 bytes, or 16,777,215)
- 0x5F - globalGet3 (Get a global variable. Global var number can be up to 3 bytes, or 16,777,215)
- 0x60 - globalSet3 (Set a global variable. Global var number can be up to 3 bytes, or 16,777,215)
- 0x61 - pushI24 (Push a 24 bit number onto the stack, number can be up to 16,777,215)
- 0x62 - Switch (Switch, same as in C, a series of values with corresponding points to jump to if there is a match. If no match, nothing happens)
- 0x63 - PushString (Takes top item off stack and returns the string at that location of the string block)
- 0x64 - GetHash (Gets the hash of the string on the top of the stack and stores the hash on the top of the stack)
- 0x65 - StrCopy (Related to string concatenation. Copies a string onto the stack)
- 0x66 - ItoS (Converts an integer to a string)
- 0x67 - StrAdd (Takes two pointers to strings off the stack, adds them together and stores a new pointer on the stack)
- 0x68 - StrAddi (Pops two items off the stack, and converts the second item from integer to string, then adds it to the end of the first string)
- 0x69 - SnCopy (Get two pointers off the stack, copy data from location pointed to by second item to the location pointed to by second item)
- 0x6A - Catch (Sets up a safe area to catch errors)
- 0x6B - Throw (Indicates an area that handles a script error relative to the catch opcode)
- 0x6C - pCall (unknown...)
- 0x6D - push_-1 (pushes -1 onto the stack)
- 0x6E - push_0 (pushes 0 onto the stack)
- 0x6F - push_1 (pushes 1 onto the stack)
- 0x70 - push_2 (pushes 2 onto the stack)
- 0x71 - push_3 (pushes 3 onto the stack)
- 0x72 - push_4 (pushes 4 onto the stack)
- 0x73 - push_5 (pushes 5 onto the stack)
- 0x74 - push_6 (pushes 6 onto the stack)
- 0x75 - push_7 (pushes 7 onto the stack)
- 0x76 - fPush_-1 (pushes -1.0 float onto the stack)
- 0x77 - fPush_0.0 (pushes 0.0 float onto the stack)
- 0x78 - fPush_1.0 (pushes 1.0 float onto the stack)
- 0x79 - fPush_2.0 (pushes 2.0 float onto the stack)
- 0x7A - fPush_3.0 (pushes 3.0 float onto the stack)
- 0x7B - fPush_4.0 (pushes 4.0 float onto the stack)
- 0x7C - fPush_5.0 (pushes 5.0 float onto the stack)
- 0x7D - fPush_6.0 (pushes 6.0 float onto the stack)
- 0x7E - fPush_7.0 (pushes 7.0 float onto the stack)
Advertisement
Add Comment
Please, Sign In to add comment