The structure of the byte code used by the game ...

// c++
struct op {
	unsigned char b1, b2, b3;
	unsigned char op;
	
	union { // 32 bits used in various ways
		int i; // generally this
		float f; // could be this if it is the load literal instruction providing a real
		// ... ?
	} value;
}

// if any value is not specified below it is typically initialized to zero
// ---------------------------------

0x00 - invalid op

0x01 - invalid op (but it does show up apparently at the end of all the byte code);
even though it probably does the same thing as any other invalid op if it actually runs...
perhaps it has a special meaning if there is code that reads byte code for analysis purposes

0x02 - looks like this does a jump (same as 0x2b), but since there is a jump op (0x2b) already, it seems superfluous
value is the jump table index

0x03 - function begin (does not do anything when executing byte code)
value is the scan string index

0x04 - end function (does nothing when executing byte code)

0x05 - local declaration
b3 is the type; value is the scan string index (which points to the local's name)

0x06 - global declaration
b3 is the type; value is the scan string index (global's name) ...

0x07 - constant declaration
b3 is the type; value is the scan string index

0x08 - copies value from stack (at index from top) to a newly created (local) variable with the given name
(not sure if it is actually a local variable, but it seems to behave like a local variable declaration + copy value from stack op put together)
b3 is the type; b2 is the index of the value on the stack from the top (n-0 typically being the first parameter, n-1 the second ...);
(in other words, with three parameters, the first parameter would be at index 3, the second at index 2, the first at index 1)
value is the variable scan string index

0x09 - pushes declared type (not sure if it actually touches the stack)
value is the type name scan string index

0x0a - derives the previously pushed type (and pops, if there is a stack involved, not sure)
value is the new type name scan string index

0x0b - pops N values from the stack
b3 is the number of values to pop

0x0c - writes a literal of a certain type to the specified register
b2 is the type; b3 is the register to put the value in; value is the value of the literal;
for value, the format could be a simple number (for most types), a float, or a scan string index

0x0d - copies register into register
b2 is the source register; b3 is the destination register

0x0e - copies variable value into register
b2 is the type; b3 is destination register; value is the variable scan string index

0x0f - loads a function address into register
b2 is the type; b3 is the destination register; value is the function name scan string index

0x10 - gets the value from an array variable
b1 is the type; b2 is the source/index register; b3 is the destination register; value is the variable scan string index

0x11 - writes a register value to a variable
b3 is the source register; value is the variable scan string index

0x12 - writes a register value to an array
b2 is the source register; b3 is the register specifying the array index; value is the variable scan string index

0x13 - pushes a register value onto the stack ; increases stack size by one
b3 is the source register

0x14 - pops a stack value into a register ; reduces stack size by one
b3 is the destination register

0x15 - calls a native
value is the function name scan string index; pops its parameters off the stack as part of the call

0x16 - calls a function
value is the function name scan string index; does not pop its parameters off the stack (calls stackpopn afterwards)

0x17 - converts an integer to a real in place in a register
b3 is the source/destination register

0x18 - boolean and logic taking two values and returns 0 or 1 in the destination register
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x19 - boolean or logic taking two values and returns 0 or 1 in the destination register
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1a - equality check ( == )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1b - not equal check ( != )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1c - less than or equal to check ( <= )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1d - greater than or equal to check ( >= )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1e - less than check ( < )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x1f - greater than check ( > )
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x20 - addition logic
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x21 - subtraction logic
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x22 - multiplication logic
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x23 - division logic
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x24 - modulo logic
b1 is the right operand register; b2 is the left operand register; b3 is the destination register

0x25 - negates a register in place
b3 is the source/destination register

0x26 - nots a register in place
b3 is the source/destination register

0x27 - returns from a function (probably pops a stack value too)

0x28 - specifies a location for jump ops to jump to (this is a label op)
value is the jump table index

0x29 - jumps if the register is true
b3 is the register to test; value is the jump table index

0x2a - jumps if the register is false
b3 is the register to test; value is the jump table index

0x2b - jumps to the specified location unconditionally
value is the jump table index
