Note: a word is considered to be 32 bit long. Header (4 words): word: number of words in code block word: number of words in integer literal block word: number of words in float literal block word: number of words in string literal block Body (variable length): code block integer literal block (contains a collection of 1 word long integers) float literal block (contains a collection of 1 word long floating point numbers) string literal block (contains a collection of strings of variable length, word-padded) Code bit-patterns: 3322222222221111111111 10987654321098765432109876543210 00ccccccAAAAAAAAAAAAAAAAAAAAAAAA segment 0: 64 opcodes, 1 24-bit argument 01ccccccAAAAAAAAAAAABBBBBBBBBBBB segment 1: 64 opcodes, 2 12-bit arguments 10ccccccccccAAAAAAAAAAAAAAAAAAAA segment 2: 1024 opcodes, 1 20-bit argument 110000ccccccccccAAAAAAAAAAAAAAAA segment 3: 1024 opcodes, 1 16-bit argument 110001ccccccccccAAAAAAAABBBBBBBB segment 4: 1024 opcodes, 2 8-bit arguments 110010cccccccccccccccccccccccccc segment 5: 67108864 opcodes, no arguments other bit-patterns reserved legent: c: code A: argument 0 B: argument 1 Segment 0: op 0: push A opcodes 1-31 unused opcodes 32-63 reserved for extensions Segment 1: opcodes 0-31 unused opcodes 32-63 reserved for extensions Segment 2: opcodes 0-511 unused opcodes 512-1023 reserved for extensions Segment 3: op 0: show message box with message string literal index in stack[0]; buttons (if any) in stack[arg0]..stack[1]; additional arguments (if any) in stack[arg0+n]..stack[arg0+1]; n is determined according to the message string all arguments are removed from stack opcodes 1-511 unused opcodes 512-1023 reserved for extensions Segment 4: opcodes 0-511 unused opcodes 512-1023 reserved for extensions Segment 5: op 0: store stack[0] in local short stack[1] and pop twice op 1: store stack[0] in local long stack[1] and pop twice op 2: store stack[0] in local float stack[1] and pop twice op 3: convert stack[0] from integer to float op 4: replace stack[0] with integer literal index stack[0] op 5: replace stack[0] with float literal index stack[0] op 6: convert stack[0] from float to integer op 7: invert sign of int value stack[0] op 8: invert sign of float value stack[0] op 9: add (integer) stack[0] to stack[1], pop twice, push result op 10: add (float) stack[0] to stack[1], pop twice, push result op 11: sub (integer) stack[1] from stack[0], pop twice, push result op 12: sub (float) stack[1] from stack[0], pop twice, push result op 13: mul (integer) stack[0] with stack[1], pop twice, push result op 14: mul (float) stack[0] with stack[1], pop twice, push result op 15: div (integer) stack[1] by stack[0], pop twice, push result op 16: div (float) stack[1] by stack[0], pop twice, push result op 17: convert stack[1] from integer to float op 18: convert stack[1] from float to integer op 19: take square root of stack[0] (float) op 20: return op 21: replace stack[0] with local short stack[0] op 22: replace stack[0] with local long stack[0] op 23: replace stack[0] with local float stack[0] opcodes 24-33554431 unused opcodes 33554432-67108863 reserved for extensions