Codename | Tomb |
Introduced | v0.9.0.0 |
Date | 2014.11.13. |
Revision | r3179 |
Preceded by | Behemoth v2 |
Succeeded by | Tomb2 |
Instructions | single and double 16 bits |
Opcode | 8 bits |
Immediate | 8 and 8+16 bits |
Initial version.
New instructions introduced:
New instructions introduced:
Last version that is supported in WTB3
New instructions introduced:
bits 15-8 | bits 7-0 |
0x00 | must be zero |
No operation.
bits 15-8 | bits 7-0 |
0x04 | must be zero |
Currently this is a dummy instruction.
Lock the read/write access of the global variables of current program. The access is exclusive. Execution will be suspended until the thread gets the lock.
bits 15-8 | bits 7-0 |
0x05 | must be zero |
Currently this is a dummy instruction.
Unlock the read/write access of the global variables of current program. The access is exclusive.
bits 15-8 | bits 7-0 |
0x08 | opdata |
Load data.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := POP(addr) DSP := DSP - opdata memcpy(DSP, ADDR, opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x09 | opdata [23-16] | opdata [15-0] |
Load data.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := POP(addr) DSP := DSP - opdata memcpy(DSP, ADDR, opdata) |
bits 15-8 | bits 7-0 |
0x0A | must be zero |
Load data.
SIZE := POP(int32) ADDR := POP(addr) IF SIZE & 0x3 THEN RAISE BadProgramAccessException ENDIF DSP := DSP - SIZE memcpy(DSP, ADDR, SIZE) |
bits 15-8 | bits 7-0 |
0x0C | opdata |
Store data.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := POP(addr) memcpy(ADDR, DSP, opdata) DSP := DSP + opdata |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x0D | opdata [23-16] | opdata [15-0] |
Store data.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := POP(addr) memcpy(ADDR, DSP, opdata) DSP := DSP + opdata |
bits 15-8 | bits 7-0 |
0x0E | must be zero |
Store data.
SIZE := POP(int32) ADDR := POP(addr) IF SIZE & 0x3 THEN RAISE BadProgramAccessException ENDIF memcpy(ADDR, DSP, SIZE) DSP := DSP + SIZE |
bits 15-8 | bits 7-0 |
0x10 | opdata |
Internal DataStack Dereference.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := DSP + opdata *ADDR := **ADDR |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x11 | opdata [23-16] | opdata [15-0] |
Internal DataStack Dereference.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF ADDR := DSP + opdata *ADDR := **ADDR |
bits 15-8 | bits 7-0 |
0x12 | must be zero |
Internal DataStack Dereference.
OFFS := POP(int32) ADDR := DSP + OFFS IF OFFS & 0x3 THEN RAISE BadProgramAccessException ENDIF *ADDR := **ADDR |
bits 15-8 | bits 7-0 |
0x14 | opdata |
Push base address of program data.
PUSH(BaseAddr + opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x15 | opdata [23-16] | opdata [15-0] |
Push base address of program data.
PUSH(BaseAddr + opdata) |
bits 15-8 | bits 7-0 |
0x16 | must be zero |
Push base address of program data.
OFFS := POP(int32) PUSH(BaseAddr + OFFS) |
bits 15-8 | bits 7-0 |
0x18 | opdata |
Push Dynamic Variable Table address.
PUSH(DVTBase + opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x19 | opdata [23-16] | opdata [15-0] |
Push Dynamic Variable Table address.
PUSH(DVTBase + opdata) |
bits 15-8 | bits 7-0 |
0x1A | must be zero |
Push Dynamic Variable Table address.
OFFS := POP(int32) PUSH(DVTBase + OFFS) |
bits 15-8 | bits 7-0 |
0x1B | must be zero |
Push PC (Program Counter).
PUSH(PC) |
bits 15-8 | bits 7-0 |
0x1C | opdata |
Duplicate the top opdata octets on the DataStack.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF DSP := DSP - opdata memcpy(DSP, DSP+opdata, opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x1D | opdata [23-16] | opdata [15-0] |
Duplicate the top opdata octets on the DataStack.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF DSP := DSP - opdata memcpy(DSP, DSP+opdata, opdata) |
bits 15-8 | bits 7-0 |
0x1E | opdata |
Drop the top opdata octets from the DataStack.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF DSP := DSP + opdata |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x1F | opdata [23-16] | opdata [15-0] |
Drop the top opdata octets from the DataStack.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF DSP := DSP + opdata |
bits 15-8 | bits 7-0 |
0x20 | opdata |
Push zero extended 32-bit integer.
PUSH(opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x21 | opdata [23-16] | opdata [15-0] |
Push zero extended 32-bit integer.
PUSH(opdata) |
bits 15-8 | bits 7-0 |
0x22 | opdata |
Push one extended 32-bit integer.
PUSH(0xFFFFFF00 | opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x23 | opdata [23-16] | opdata [15-0] |
Push one extended 32-bit integer.
PUSH(0xFF000000 | opdata) |
bits 15-8 | bits 7-0 |
0x24 | opdata |
Push zero extended 64-bit integer.
PUSH64(opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x25 | opdata [23-16] | opdata [15-0] |
Push zero extended 64-bit integer.
PUSH64(opdata) |
bits 15-8 | bits 7-0 |
0x26 | opdata |
Push one extended 64-bit integer.
PUSH64(0xFFFFFFFFFFFFFF00 | opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x27 | opdata [23-16] | opdata [15-0] |
Push one extended 64-bit integer.
PUSH64(0xFFFFFFFFFF000000 | opdata) |
bits 15-8 | bits 7-0 |
0x28 | opdata |
Allocate DVT for opdata octets.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF IF NOT HAVE_DVT AND NOT HAVE_CSOS THEN CSP := CSP - opdata SET_DVT(CSP) PUSH_CS(opdata) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x29 | opdata [23-16] | opdata [15-0] |
Allocate DVT for opdata octets.
IF opdata & 0x3 THEN RAISE BadProgramAccessException ENDIF IF NOT HAVE_DVT AND NOT HAVE_CSOS THEN CSP := CSP - opdata SET_DVT(CSP) PUSH_CS(opdata) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x2A | must be zero |
Allocate DVT.
SIZE := POP(int32) IF SIZE & 0x3 THEN RAISE BadProgramAccessException ENDIF IF NOT HAVE_DVT AND NOT HAVE_CSOS THEN CSP := CSP - SIZE SET_DVT(CSP) PUSH_CS(SIZE) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x2B | must be zero |
Free DVT.
IF HAVE_DVT THEN SIZE := POP_CS(int32) CSP := CSP + SIZE SET_DVT(0) ENDIF |
bits 15-8 | bits 7-0 |
0x2C | opdata |
Allocate CSOS for opdata objects.
IF HAVE_DVT AND NOT HAVE_CSOS THEN COUNT := opdata SIZE := opdata * sizeof(object_entry) CSP := CSP - SIZE SET_CSOS(CSP) PUSH_CS(COUNT) CSOS_SP := 0 ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x2D | opdata [23-16] | opdata [15-0] |
Allocate CSOS for opdata objects.
IF HAVE_DVT AND NOT HAVE_CSOS THEN COUNT := opdata SIZE := opdata * sizeof(object_entry) CSP := CSP - SIZE SET_CSOS(CSP) PUSH_CS(COUNT) CSOS_SP := 0 ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x2E | must be zero |
Allocate CSOS.
IF HAVE_DVT AND NOT HAVE_CSOS THEN COUNT := POP(int32) SIZE := COUNT * sizeof(object_entry) CSP := CSP - SIZE SET_CSOS(CSP) PUSH_CS(SIZE) CSOS_SP := 0 ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x2F | must be zero |
Free CSOS.
IF HAVE_CSOS THEN SIZE := POP_CS(int32) CSP := CSP + SIZE SET_CSOS(0) ENDIF |
bits 15-8 | bits 7-0 |
0x30 | must be zero |
Push an object_entry onto the CSOS from the top of stack.
IF HAVE_CSOS THEN IF CSOS_SP < CSOS_SIZE THEN memcpy(CSOS[CSOS_SP], DSP, sizeof(object_entry)) CSOS_SP := CSOS_SP + 1 DSP := DSP + sizeof(object_entry) ELSE RAISE StackOverflowException ENDIF ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x31 | must be zero |
Pop an object_entry from the CSOS onto the stack.
IF HAVE_CSOS THEN IF 0 != CSOS_SP THEN DSP := DSP - sizeof(object_entry) CSOS_SP := CSOS_SP - 1 memcpy(DSP, CSOS[CSOS_SP], sizeof(object_entry)) ELSE RAISE StackOverflowException ENDIF ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x32 | must be zero |
Push the CSOS stack pointer onto the stack.
PUSH(CSOS_SP) |
bits 15-8 | bits 7-0 |
0x33 | must be zero |
Push TOS size onto the stack.
PUSH(LOCAL_TOS_SP) |
bits 15-8 | bits 7-0 |
0x34 | must be zero |
Push an object_entry onto the TOS from the top of stack.
memcpy(TOS[LOCAL_TOS_SP], DSP, sizeof(object_entry)) LOCAL_TOS_SP := LOCAL_TOS_SP + 1 DSP := DSP + sizeof(object_entry) |
bits 15-8 | bits 7-0 |
0x35 | must be zero |
Pop a object_entry from the TOS onto the stack.
IF 0 != LOCAL_TOS_SP THEN DSP := DSP - sizeof(object_entry) LOCAL_TOS_SP := LOCAL_TOS_SP - 1 memcpy(DSP, TOS[LOCAL_TOS_SP], sizeof(object_entry)) ELSE RAISE StackOverflowException ENDIF |
bits 15-8 | bits 7-0 |
0x36 | must be zero |
Drop the top object_entry from the TOS.
IF 0 != LOCAL_TOS_SP THEN LOCAL_TOS_SP := LOCAL_TOS_SP - 1 ELSE RAISE StackOverflowException ENDIF |
bits 15-8 | bits 7-0 |
0x37 | must be zero |
Clear the TOS with executing all object_entry.
WHILE LOCAL_TOS_SP > 0 DO DSP := DSP - sizeof(object_entry) LOCAL_TOS_SP := LOCAL_TOS_SP - 1 memcpy(DSP, TOS[LOCAL_TOS_SP], sizeof(object_entry)) 'cfp' END |
Note that, this is a pseudo instruction, actually it is a routine call: push the PC, and jumps to an internal routine in the virtual machine context. The executed routine is the following:
tsz jf.i +4 tpo cfp jmp.i -4 ja.s |
bits 15-8 | bits 7-0 |
0x38 | opdata |
Push DSP into stack.
PUSH(DSP + opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x39 | opdata [23-16] | opdata [15-0] |
Push DSP into stack.
PUSH(DSP + opdata) |
bits 15-8 | bits 7-0 |
0x3A | opdata |
Push virtual address size onto the stack.
PUSH(sizeof(address) * opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x3B | opdata [23-16] | opdata [15-0] |
Push virtual address size onto the stack.
PUSH(sizeof(address) * opdata) |
bits 15-8 | bits 7-0 |
0x3C | opdata |
Call a local function.
PUSH_CALLFRAME PC := BaseAddr_PC + opdata |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x3D | opdata [23-16] | opdata [15-0] |
Call a local function.
PUSH_CALLFRAME PC := BaseAddr_PC + opdata |
bits 15-8 | bits 7-0 |
0x3E | must be zero |
Call a local function.
PUSH_CALLFRAME ADDR := POP(addr) PC := BaseAddr_PC + ADDR |
bits 15-8 | bits 7-0 |
0x3F | must be zero |
Leave a function.
POP_CALLFRAME |
bits 15-8 | bits 7-0 |
0x40 | opdata |
Unconditional relative jump.
PC := PC + EXTEND_SIGN_8(opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x41 | opdata [23-16] | opdata [15-0] |
Unconditional relative jump.
PC := PC + EXTEND_SIGN_24(opdata) |
bits 15-8 | bits 7-0 |
0x42 | must be zero |
Unconditional relative jump.
OFFS := POP(addr) PC := PC + OFFS |
bits 15-8 | bits 7-0 |
0x44 | opdata |
Relative jump if condition is true.
COND := POP(bool) IF COND THEN PC := PC + EXTEND_SIGN_8(opdata) ENDIF |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x45 | opdata [23-16] | opdata [15-0] |
Relative jump if condition is true.
COND := POP(bool) IF COND THEN PC := PC + EXTEND_SIGN_24(opdata) ENDIF |
bits 15-8 | bits 7-0 |
0x46 | must be zero |
Relative jump if condition is true.
COND := POP(bool) OFFS := POP(addr) IF COND THEN PC := PC + OFFS ENDIF |
bits 15-8 | bits 7-0 |
0x48 | opdata |
Relative jump if condition is false.
COND := POP(bool) IF NOT COND THEN PC := PC + EXTEND_SIGN_8(opdata) ENDIF |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x49 | opdata [23-16] | opdata [15-0] |
Relative jump if condition is false.
COND := POP(bool) IF NOT COND THEN PC := PC + EXTEND_SIGN_24(opdata) ENDIF |
bits 15-8 | bits 7-0 |
0x4A | must be zero |
Relative jump if condition is false.
COND := POP(bool) OFFS := POP(addr) IF NOT COND THEN PC := PC + OFFS ENDIF |
bits 15-8 | bits 7-0 |
0x4C | opdata |
Unconditional absolute jump.
PC := PROG_PC_BASE + opdata |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x4D | opdata [23-16] | opdata [15-0] |
Unconditional absolute jump.
PC := PROG_PC_BASE + opdata |
bits 15-8 | bits 7-0 |
0x4E | must be zero |
Unconditional absolute jump.
OFFS := POP(addr) PC := OFFS |
bits 15-8 | bits 7-0 |
0x50 | opdata |
Execute a microproram.
IF opdata IS VALID MICROPROGRAM ID THEN EXECUTE(opdata) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x51 | opdata [23-16] | opdata [15-0] |
Execute a microproram.
IF opdata IS VALID MICROPROGRAM ID THEN EXECUTE(opdata) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x52 | must be zero |
Execute a microproram.
MICROPROG_ID := POP(int32) IF MICROPROG_ID IS VALID MICROPROGRAM ID THEN EXECUTE(MICROPROG_ID) ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0x54 | opdata |
Dynamic-linking execution. Since the imported functions are stored in the program base data, the dle instruction is just a shortcut to:
pba.i opdata ldfp cfp |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x55 | opdata [23-16] | opdata [15-0] |
Dynamic-linking execution. Since the imported functions are stored in the program base data, the dle instruction is just a shortcut to:
pba.l opdata ldfp cfp |
bits 15-8 | bits 7-0 |
0x56 | must be zero |
Dynamic-linking execution. Since the imported functions are stored in the program base data, the dle instruction is just a shortcut to:
pba.s ldfp cfp |
bits 15-8 | bits 7-0 |
0x57 | must be zero |
Call function pointer from the stack.
FPN := POP(pfn) PUSH_CALLFRAME PC, PROG := PFN |
bits 15-8 | bits 7-0 |
0x58 | opdata |
Make a function pointer to a function in the current program. opdata interpreted as a local PC.
PUSH_PFN(PROG, opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x59 | opdata [23-16] | opdata [15-0] |
Make a function pointer to a function in the current program. opdata interpreted as a local PC.
PUSH_PFN(PROG, opdata) |
bits 15-8 | bits 7-0 |
0x5A | must be zero |
Make a function pointer to a function in the current program.s
LOCAL_PC := POP(addr) PUSH_PFN(PROG, LOCAL_PC) |
bits 15-8 | bits 7-0 |
0x5B | must be zero |
(since: Addition 2)
Delete the top entry in TOS.
IF LOCAL_TOS_SP != 0 THEN 'tpo' 'cfp' ELSE RAISE StackOverflowException ENDIF |
bits 15-8 | bits 7-0 |
0x5C | must be zero |
Load function pointer from memory onto data stack.
ADDR := POP(addr) DSP := DSP - sizeof(PFN) memcpy(DSP, ADDR, sizeof(PFN)) |
bits 15-8 | bits 7-0 |
0x5D | must be zero |
Store function pointer from data stack into memory.
ADDR := POP(addr) memcpy(ADDR, DSP, sizeof(PFN)) DSP := DSP + sizeof(PFN) |
bits 15-8 | bits 7-0 |
0x5E | opdata |
Push the size of the function pointer multiplied by opdata.
PUSH(sizeof(PFN) * opdata) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x5F | opdata [23-16] | opdata [15-0] |
Push the size of the function pointer multiplied by opdata.
PUSH(sizeof(PFN) * opdata) |
bits 15-8 | bits 7-0 |
0x60 | must be zero |
Create a new string from a raw C string.
C_STR_ADDR := POP(addr) STR_ADDR := NEW STRING ( C_STR_ADDR ) PUSH(STR_ADDR) |
bits 15-8 | bits 7-0 |
0x61 | must be zero |
Create a new string from an existing string object (copy the original string).
STR_ADDR := POP(addr) STR_ADDR := COPY STRING ( STR_ADDR ) PUSH(STR_ADDR) |
bits 15-8 | bits 7-0 |
0x62 | must be zero |
Determine the length of the string in characters (without the terminating zero).
STR_ADDR := POP(addr) PUSH(strlen(STR_ADDR)) |
bits 15-8 | bits 7-0 |
0x63 | must be zero |
Delete the string from the top of the stack.
STR_ADDR := POP(addr) DELETE STRING ( STR_ADDR ) |
bits 15-8 | bits 7-0 |
0x64 | opdata |
Get reference to a character of the string, the index is the {opdata}.
STR_ADDR := POP(addr) ADDR := char_array(STR_ADDR) + opdata |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x65 | opdata [23-16] | opdata [15-0] |
Get reference to a character of the string, the index is the {opdata}.
STR_ADDR := POP(addr) ADDR := char_array(STR_ADDR) + opdata |
bits 15-8 | bits 7-0 |
0x66 | must be zero |
Get reference to a character of the string, the index is taken from the stack.
INDEX := POP(int32) STR_ADDR := POP(addr) ADDR := char_array(STR_ADDR) + INDEX |
bits 15-8 | bits 7-0 |
0x67 | opdata |
Create a new sequence skeleton.
ELEMSIZE := opdata COUNT := POP(int32) IF ELEMSIZE == 0 THEN RAISE BadProgramAccessException ENDIF ADDR := NEW SEQUENCE SKELETON ( ELEMSIZE, COUNT ) PUSH(ADDR) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x68 | opdata [23-16] | opdata [15-0] |
Create a new sequence skeleton.
ELEMSIZE := opdata COUNT := POP(int32) IF ELEMSIZE == 0 THEN RAISE BadProgramAccessException ENDIF ADDR := NEW SEQUENCE SKELETON ( ELEMSIZE, COUNT ) PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x69 | must be zero |
Create a new sequence skeleton.
ELEMSIZE := POP(int32) COUNT := POP(int32) IF ELEMSIZE == 0 THEN RAISE BadProgramAccessException ENDIF ADDR := NEW SEQUENCE SKELETON ( ELEMSIZE, COUNT ) PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x6A | must be zero |
Delete a sequence skeleton. This instruction frees up only the memory of the skeleton. If any dynamic objects were stored here, the reference to them will be lost.
ADDR := POP(addr) DELETE SEQUENCE SKELETON ( ADDR ) |
bits 15-8 | bits 7-0 |
0x6B | opdata |
Sequence item reference. Makes an address to the specified item (element) in the sequence.
INDEX := opdata ADDR := POP(addr) ELEMSIZE := SEQUENCE ELEMENT SIZE ( ADDR ) COUNT := SEQUENCE ELEMENT COUNT ( ADDR ) IF INDEX >= COUNT THEN RAISE IndexOutOfRangeException ENDIF OFFSET := ELEMSIZE * INDEX ADDR := SEQUENCE DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x6C | opdata [23-16] | opdata [15-0] |
Sequence item reference. Makes an address to the specified item (element) in the sequence.
INDEX := opdata ADDR := POP(addr) ELEMSIZE := SEQUENCE ELEMENT SIZE ( ADDR ) COUNT := SEQUENCE ELEMENT COUNT ( ADDR ) IF INDEX >= COUNT THEN RAISE IndexOutOfRangeException ENDIF OFFSET := ELEMSIZE * INDEX ADDR := SEQUENCE DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x6D | must be zero |
Sequence item reference. Makes an address to the specified item (element) in the sequence.
INDEX := POP(int32) ADDR := POP(addr) ELEMSIZE := SEQUENCE ELEMENT SIZE ( ADDR ) COUNT := SEQUENCE ELEMENT COUNT ( ADDR ) IF INDEX >= COUNT THEN RAISE IndexOutOfRangeException ENDIF OFFSET := ELEMSIZE * INDEX ADDR := SEQUENCE DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x6E | must be zero |
Determines the length of the sequence (or the number of elements in the sequence).
ADDR := POP(addr) COUNT := SEQUENCE ELEMENT COUNT ( ADDR ) PUSH(COUNT) |
bits 15-8 | bits 7-0 |
0x6F | opdata |
Create a new record skeleton.
SIZE := opdata ADDR := NEW RECORD SKELETON ( SIZE ) PUSH(ADDR) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x70 | opdata [23-16] | opdata [15-0] |
Create a new record skeleton.
SIZE := opdata ADDR := NEW RECORD SKELETON ( SIZE ) PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x71 | must be zero |
Create a new record skeleton.
SIZE := POP(int32) ADDR := NEW RECORD SKELETON ( SIZE ) PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x72 | must be zero |
Delete a record skeleton. This instruction frees up only the memory of the skeleton. If any dynamic objects were stored here, the reference to them will be lost.
ADDR := POP(addr) DELETE RECORD SKELETON ( ADDR ) |
bits 15-8 | bits 7-0 |
0x73 | opdata |
Record field reference. Makes an address to the field on the specified offset in the record.
OFFSET := opdata ADDR := POP(addr) SIZE := RECORD SIZE ( ADDR ) IF OFFSET >= SIZE THEN RAISE IndexOutOfRangeException ENDIF ADDR := RECORD DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x74 | opdata [23-16] | opdata [15-0] |
Record field reference. Makes an address to the field on the specified offset in the record.
OFFSET := opdata ADDR := POP(addr) SIZE := RECORD SIZE ( ADDR ) IF OFFSET >= SIZE THEN RAISE IndexOutOfRangeException ENDIF ADDR := RECORD DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x75 | must be zero |
Record field reference. Makes an address to the field on the specified offset in the record.
OFFSET := POP(int32) ADDR := POP(addr) SIZE := RECORD SIZE ( ADDR ) IF OFFSET >= SIZE THEN RAISE IndexOutOfRangeException ENDIF ADDR := RECORD DATA START ADDRESS ( ADDR ) + OFFSET PUSH(ADDR) |
bits 15-8 | bits 7-0 |
0x7B | must be zero |
Raise the exception on the top of the stack.
GLOBAL_EXCEPTION_ID := POP(int32) RAISE GLOBAL_EXCEPTION_ID |
bits 15-8 | bits 7-0 |
0x7C | opdata |
Set the exception handler of the current call frame.
OFFS := opdata SET EHANDLER ( PC + OFFS ) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x7D | opdata [23-16] | opdata [15-0] |
Set the exception handler of the current call frame.
OFFS := opdata SET EHANDLER ( PC + OFFS ) |
bits 15-8 | bits 7-0 |
0x7E | must be zero |
Set the exception handler of the current call frame.
OFFS := POP(int32) SET EHANDLER ( PC + OFFS ) |
bits 15-8 | bits 7-0 |
0x7F | must be zero |
Clear the exception handler of the current call frame.
SET EHANDLER ( NULL_PC ) |
bits 15-8 | bits 7-0 |
0x80 | opdata |
Add to the top 32-bit integer an immediate integer.
RHS := opdata LHS := POP(int32) PUSH(LHS + RHS) |
bits 15-8 | bits 7-0 |
0x81 | must be zero |
Add the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS + RHS) |
bits 15-8 | bits 7-0 |
0x82 | opdata |
Subtract from the top 32-bit integer an immediate integer.
RHS := opdata LHS := POP(int32) PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 |
0x83 | must be zero |
Subtract the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 |
0x84 | opdata |
Multiply the top 32-bit integer with an immediate integer.
RHS := opdata LHS := POP(int32) PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0x85 | must be zero |
Multiply the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0x86 | opdata |
Divide the top 32-bit integer by an immediate integer.
RHS := opdata LHS := POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0x87 | must be zero |
Divide the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0x88 | opdata |
Shift left the top 32-bit integer by an immediate integer.
RHS := POP(int32) LHS := opdata PUSH(LHS << RHS) |
bits 15-8 | bits 7-0 |
0x89 | must be zero |
Shift left.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS << RHS) |
bits 15-8 | bits 7-0 |
0x8A | opdata |
Shift right the top 32-bit integer by an immediate integer.
RHS := POP(int32) LHS := opdata PUSH(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0x8B | must be zero |
Shift right.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0x8C | opdata |
Arithmetic shift right the top 32-bit signed integer by an immediate integer.
RHS := POP(int32) # SIGNED LHS := opdata PUSH(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0x8D | must be zero |
Arithmetic shift right.
RHS := POP(int32) LHS := POP(int32) # SIGNED PUSH(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0x8E | opdata |
Rotate right the top 32-bit signed integer by an immediate integer.
RHS := POP(int32) LHS := opdata PUSH(LHS rotate_right RHS) |
bits 15-8 | bits 7-0 |
0x8F | must be zero |
Rotate right.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS rotate_right RHS) |
bits 15-8 | bits 7-0 |
0x90 | opdata |
Multiply the top 32-bit signed integer with an immediate integer.
RHS := opdata LHS := POP(int32) # SIGNED PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0x91 | must be zero |
Multiply the two top 32-bit signed integer.
RHS := POP(int32) # SIGNED LHS := POP(int32) # SIGNED PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0x92 | opdata |
Divide the top 32-bit signed integer by an immediate integer.
RHS := opdata LHS := POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0x93 | must be zero |
Divide the two top 32-bit signed integer.
RHS := POP(int32) # SIGNED LHS := POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0x94 | must be zero |
Unsigned modulo operation on the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS % RHS) |
bits 15-8 | bits 7-0 |
0x95 | must be zero |
Signed modulo operation on the two top 32-bit signed integer.
RHS := POP(int32) # SIGNED LHS := POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(LHS % RHS) |
bits 15-8 | bits 7-0 |
0x96 | opdata |
Shift left the top 32-bit integer by 16 bits and mix (or) the opdata into the bottom.
WORD := POP(int32) WORD := (WORD << 16) | opdata PUSH(WORD) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x97 | opdata [23-16] | opdata [15-0] |
Shift left the top 32-bit integer by 16 bits and mix (or) the opdata into the bottom.
WORD := POP(int32) WORD := (WORD << 16) | opdata PUSH(WORD) |
bits 15-8 | bits 7-0 |
0x98 | opdata |
Reverse subtract. Subtract from an immediate integer the top 32-bit integer.
RHS := POP(int32) LHS := opdata PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0x99 | opdata [23-16] | opdata [15-0] |
Reverse subtract. Subtract from an immediate integer the top 32-bit integer.
RHS := POP(int32) LHS := opdata PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 |
0x9A | must be zero |
Addition on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS + RHS) |
bits 15-8 | bits 7-0 |
0x9B | must be zero |
Subtraction on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS - RHS) |
bits 15-8 | bits 7-0 |
0x9C | must be zero |
Multiplication on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS * RHS) |
bits 15-8 | bits 7-0 |
0x9D | must be zero |
Division on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH64(LHS / RHS) |
bits 15-8 | bits 7-0 |
0x9E | must be zero |
Shift left 64-bit integers.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS << RHS) |
bits 15-8 | bits 7-0 |
0x9F | must be zero |
Shift right 64-bit integers.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0xA0 | must be zero |
Arithmetic shift right 64-bit integers.
RHS := POP(int64) LHS := POP(int64) # SIGNED PUSH64(LHS >> RHS) |
bits 15-8 | bits 7-0 |
0xA1 | must be zero |
Rotate right 64-bit integers.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS rotate_right RHS) |
bits 15-8 | bits 7-0 |
0xA2 | must be zero |
Perform the bit-wise exclusive or operation on the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS ^ RHS) |
bits 15-8 | bits 7-0 |
0xA3 | must be zero |
Perform the bit-wise and operation on the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS & RHS) |
bits 15-8 | bits 7-0 |
0xA4 | must be zero |
Perform the bit-wise or operation on the two top 32-bit integer.
RHS := POP(int32) LHS := POP(int32) PUSH(LHS | RHS) |
bits 15-8 | bits 7-0 |
0xA5 | must be zero |
Perform the bit-wise not operation on the top 32-bit integer.
WORD := POP(int32) PUSH(~WORD) |
bits 15-8 | bits 7-0 |
0xA6 | must be zero |
Perform the bit-wise exclusive or operation on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS ^ RHS) |
bits 15-8 | bits 7-0 |
0xA7 | must be zero |
Perform the bit-wise and operation on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS & RHS) |
bits 15-8 | bits 7-0 |
0xA8 | must be zero |
Perform the bit-wise or operation on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) PUSH64(LHS | RHS) |
bits 15-8 | bits 7-0 |
0xA9 | must be zero |
Perform the bit-wise not operation on the top 64-bit integer.
WORD := POP(int64) PUSH64(~WORD) |
bits 15-8 | bits 7-0 |
0xAA | opdata |
Shift left the top 64-bit integer by 24 bits and mix (or) the opdata into the bottom.
WORD := POP(int64) WORD := (WORD << 24) | opdata PUSH64(WORD) |
bits 15-8 | bits 7-0 | bits 15-0 | |
0xAB | opdata [23-16] | opdata [15-0] |
Shift left the top 64-bit integer by 24 bits and mix (or) the opdata into the bottom.
WORD := POP(int64) WORD := (WORD << 24) | opdata PUSH64(WORD) |
bits 15-8 | bits 7-0 |
0xAC | must be zero |
Multiplication on the two top 64-bit signed integer.
RHS := POP(int64) # SIGNED LHS := POP(int64) # SIGNED PUSH64(LHS * RHS) |
bits 15-8 | bits 7-0 |
0xAD | must be zero |
Division on the two top 64-bit signed integer.
RHS := POP(int64) # SIGNED LHS := POP(int64) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH64(LHS / RHS) |
bits 15-8 | bits 7-0 |
0xAE | must be zero |
Modulo on the two top 64-bit integer.
RHS := POP(int64) LHS := POP(int64) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH64(LHS % RHS) |
bits 15-8 | bits 7-0 |
0xAF | must be zero |
Modulo on the two top 64-bit signed integer.
RHS := POP(int64) # SIGNED LHS := POP(int64) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH64(LHS % RHS) |
bits 15-8 | bits 7-0 |
0xB0 | must be zero |
Negate the top 32-bit signed integer.
WORD := POP(int32) # SIGNED PUSH(-WORD) |
bits 15-8 | bits 7-0 |
0xB1 | must be zero |
Negate the top 64-bit signed integer.
WORD := POP(int64) # SIGNED PUSH64(-WORD) |
bits 15-8 | bits 7-0 |
0xB2 | must be zero |
Add two 32-bit floating point numbers.
RHS := POP(float32) LHS := POP(float32) PUSH(LHS + RHS) |
bits 15-8 | bits 7-0 |
0xB3 | must be zero |
Subtract two 32-bit floating point numbers.
RHS := POP(float32) LHS := POP(float32) PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 |
0xB4 | must be zero |
Multiply two 32-bit floating point numbers.
RHS := POP(float32) LHS := POP(float32) PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0xB5 | must be zero |
Divide two 32-bit floating point numbers.
RHS := POP(float32) LHS := POP(float32) PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0xB6 | must be zero |
Add two 64-bit floating point numbers.
RHS := POP(float64) LHS := POP(float64) PUSH(LHS + RHS) |
bits 15-8 | bits 7-0 |
0xB7 | must be zero |
Subtract two 64-bit floating point numbers.
RHS := POP(float64) LHS := POP(float64) PUSH(LHS - RHS) |
bits 15-8 | bits 7-0 |
0xB8 | must be zero |
Multiply two 64-bit floating point numbers.
RHS := POP(float64) LHS := POP(float64) PUSH(LHS * RHS) |
bits 15-8 | bits 7-0 |
0xB9 | must be zero |
Divide two 64-bit floating point numbers.
RHS := POP(float64) LHS := POP(float64) PUSH(LHS / RHS) |
bits 15-8 | bits 7-0 |
0xBA | must be zero |
Negate a 32-bit floating point number.
VALUE := POP(float32) PUSH(-VALUE) |
bits 15-8 | bits 7-0 |
0xBB | must be zero |
Negate a 64-bit floating point number.
VALUE := POP(float64) PUSH(-VALUE) |
bits 15-8 | bits 7-0 |
0xBC | must be zero |
Calculate the modulus of two 32-bit floating point numbers.
RHS := POP(float32) LHS := POP(float32) PUSH(LHS % RHS) |
bits 15-8 | bits 7-0 |
0xBD | must be zero |
Calculate the modulus of two 64-bit floating point numbers.
RHS := POP(float64) LHS := POP(float64) PUSH(LHS % RHS) |
bits 15-8 | bits 7-0 |
0xBE | must be zero |
Calculate the absolute value of a 32-bit floating point number.
VALUE := POP(float32) VALUE := ABS(VALUE) PUSH(VALUE) |
bits 15-8 | bits 7-0 |
0xBF | must be zero |
Calculate the absolute value of a 64-bit floating point number.
VALUE := POP(float64) VALUE := ABS(VALUE) PUSH(VALUE) |
bits 15-8 | bits 7-0 |
0xC0 | must be zero |
Compare two 32-bit unsigned integers. Results -1, 0 or +1.
RHS := POP(int32) LHS := POP(int32) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC1 | must be zero |
Compare two 32-bit signed integers. Results -1, 0 or +1.
RHS := POP(int32) # SIGNED LHS := POP(int32) # SIGNED IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC2 | must be zero |
Compare two 64-bit unsigned integers. Results -1, 0 or +1.
RHS := POP(int64) LHS := POP(int64) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC3 | must be zero |
Compare two 64-bit signed integers. Results -1, 0 or +1.
RHS := POP(int64) # SIGNED LHS := POP(int64) # SIGNED IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC4 | must be zero |
Compare two 32-bit floating point numbers. Results -1, 0 or +1.
RHS := POP(float32) LHS := POP(float32) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC5 | must be zero |
Compare two 64-bit floating point numbers. Results -1, 0 or +1.
RHS := POP(float64) LHS := POP(float64) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC6 | must be zero |
(since: Addition 3)
Compare two 8-bit signed integers. Results -1, 0 or +1.
RHS := POP(int32) LHS := POP(int32) RHS := SIGN_EXTEND_8(RHS) LHS := SIGN_EXTEND_8(LHS) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC7 | must be zero |
(since: Addition 3)
Compare two 16-bit signed integers. Results -1, 0 or +1.
RHS := POP(int32) LHS := POP(int32) RHS := SIGN_EXTEND_16(RHS) LHS := SIGN_EXTEND_16(LHS) IF LHS < RHS THEN PUSH(-1) ELSE IF LHS > RHS THEN PUSH(+1) ELSE PUSH(0) ENDIF ENDIF |
bits 15-8 | bits 7-0 |
0xC8 | must be zero |
Query whether the result of the last comparision was less.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD < 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xC9 | must be zero |
Query whether the result of the last comparision was less or equal.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD <= 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xCA | must be zero |
Query whether the result of the last comparision was greater.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD > 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xCB | must be zero |
Query whether the result of the last comparision was greater or equal.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD >= 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xCC | must be zero |
Query whether the result of the last comparision was equal.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD == 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xCD | must be zero |
Query whether the result of the last comparision was not equal.
SIGNED_WORD := POP(int32) # SIGNED IF SIGNED_WORD != 0 THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xCE | must be zero |
(since: Addition 1)
Drop the top element from the Object Stack.
IF HAVE_CSOS IF 0 != CSOS_SP CSOS_SP := CSOS_SP - 1 ELSE RAISE StackOverflowException ENDIF ELSE RAISE BadProgramAccessException ENDIF |
bits 15-8 | bits 7-0 |
0xCF | opdata |
(since: Addition 3)
Mask (keep) the bottom opdata bits of a 32-bit value.
IF opdata > 32 THEN RAISE BadProgramAccessException ENDIF IF opdata < 32 THEN WORD := POP(int32) WORD := WORD & ((1 << opdata) - 1) PUSH(WORD) ENDIF |
bits 15-8 | bits 7-0 |
0xD0 | must be zero |
Perform the logical not operation on the top 32-bit boolean value.
BOOLEAN := POP(bool) IF BOOLEAN THEN PUSH(false) ELSE PUSH(true) ENDIF |
bits 15-8 | bits 7-0 |
0xD1 | must be zero |
Perform the logical and operation on the two top 32-bit boolean value.
RHS := POP(bool) LHS := POP(bool) IF LHS && RHS THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xD2 | must be zero |
Perform the logical or operation on the two top 32-bit boolean value.
RHS := POP(bool) LHS := POP(bool) IF LHS || RHS THEN PUSH(true) ELSE PUSH(false) ENDIF |
bits 15-8 | bits 7-0 |
0xD3 | must be zero |
Perform the logical exclusive or operation on the two top 32-bit boolean value.
RHS := POP(bool) LHS := POP(bool) IF LHS ^ RHS THEN PUSH(true) ELSE PUSH(false) ENDIF |
Load a byte from address, convert to word and push onto stack.
ADDR := POP(addr) BYTE := *(byte*)ADDR PUSH(<word>BYTE) |
bits 15-8 | bits 7-0 |
0xD5 | must be zero |
Store the least significant byte of a word.
ADDR := POP(addr) WORD := POP(int32) *ADDR := <byte>WORD |
bits 15-8 | bits 7-0 |
0xD6 | must be zero |
Load a half word from address, convert to word and push onto stack.
ADDR := POP(addr) HALF := *(half*)ADDR PUSH(<word>HALF) |
bits 15-8 | bits 7-0 |
0xD7 | must be zero |
Store the least significant half of a word.
ADDR := POP(addr) WORD := POP(int32) *ADDR := <half>WORD |
bits 15-8 | bits 7-0 |
0xD8 | opdata |
(since: Addition 3)
Add to the top 8-bit integer an immediate integer.
RHS := <byte>opdata LHS := <byte>POP(int32) PUSH(<byte>(LHS + RHS)) |
bits 15-8 | bits 7-0 |
0xD9 | must be zero |
(since: Addition 3)
Add the two top 8-bit integer.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) PUSH(<byte>(LHS + RHS)) |
bits 15-8 | bits 7-0 |
0xDA | opdata |
(since: Addition 3)
Subtract from the top 8-bit integer an immediate integer.
RHS := <byte>opdata LHS := <byte>POP(int32) PUSH(<byte>(LHS - RHS)) |
bits 15-8 | bits 7-0 |
0xDB | must be zero |
(since: Addition 3)
Subtract the two top 8-bit integer.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) PUSH(<byte>(LHS - RHS)) |
bits 15-8 | bits 7-0 |
0xDC | must be zero |
(since: Addition 3)
Multiply the two top 8-bit integer.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) PUSH(<byte>(LHS * RHS)) |
bits 15-8 | bits 7-0 |
0xDD | must be zero |
(since: Addition 3)
Multiply the two top 8-bit signed integer.
RHS := <byte>POP(int32) # SIGNED LHS := <byte>POP(int32) # SIGNED PUSH(<byte>(LHS * RHS)) |
bits 15-8 | bits 7-0 |
0xDE | must be zero |
(since: Addition 3)
Divide the two top 8-bit integer.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<byte>(LHS / RHS)) |
bits 15-8 | bits 7-0 |
0xDF | must be zero |
(since: Addition 3)
Divide the two top 8-bit signed integer.
RHS := <byte>POP(int32) # SIGNED LHS := <byte>POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<byte>(LHS / RHS)) |
bits 15-8 | bits 7-0 |
0xE0 | must be zero |
(since: Addition 3)
Unsigned modulo operation on the two top 8-bit integer.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<byte>(LHS % RHS)) |
bits 15-8 | bits 7-0 |
0xE1 | must be zero |
(since: Addition 3)
Signed modulo operation on the two top 8-bit signed integer.
RHS := <byte>POP(int32) # SIGNED LHS := <byte>POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<byte>(LHS % RHS)) |
bits 15-8 | bits 7-0 |
0xE2 | opdata |
(since: Addition 3)
Shift left the top 8-bit integer by an immediate integer.
RHS := <byte>POP(int32) LHS := <byte>opdata PUSH(<byte>(LHS << RHS)) |
bits 15-8 | bits 7-0 |
0xE3 | must be zero |
(since: Addition 3)
Shift left.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) PUSH(<byte>(LHS << RHS)) |
bits 15-8 | bits 7-0 |
0xE4 | must be zero |
(since: Addition 3)
Rotate right.
RHS := <byte>POP(int32) LHS := <byte>POP(int32) PUSH(LHS rotate_right RHS) |
bits 15-8 | bits 7-0 |
0xE5 | must be zero |
(since: Addition 3)
Perform the bit-wise not operation on the top 8-bit integer.
WORD := <byte>POP(int32) PUSH(<byte>(~WORD)) |
bits 15-8 | bits 7-0 |
0xE6 | opdata |
(since: Addition 3)
Add to the top 16-bit integer an immediate integer.
RHS := <half>opdata LHS := <half>POP(int32) PUSH(<half>(LHS + RHS)) |
bits 15-8 | bits 7-0 |
0xE7 | must be zero |
(since: Addition 3)
Add the two top 16-bit integer.
RHS := <half>POP(int32) LHS := <half>POP(int32) PUSH(<half>(LHS + RHS)) |
bits 15-8 | bits 7-0 |
0xE8 | opdata |
(since: Addition 3)
Subtract from the top 16-bit integer an immediate integer.
RHS := <half>opdata LHS := <half>POP(int32) PUSH(<half>(LHS - RHS)) |
bits 15-8 | bits 7-0 |
0xE9 | must be zero |
(since: Addition 3)
Subtract the two top 16-bit integer.
RHS := <half>POP(int32) LHS := <half>POP(int32) PUSH(<half>(LHS - RHS)) |
bits 15-8 | bits 7-0 |
0xEA | must be zero |
(since: Addition 3)
Multiply the two top 16-bit integer.
RHS := <half>POP(int32) LHS := <half>POP(int32) PUSH(<half>(LHS * RHS)) |
bits 15-8 | bits 7-0 |
0xEB | must be zero |
(since: Addition 3)
Multiply the two top 16-bit signed integer.
RHS := <half>POP(int32) # SIGNED LHS := <half>POP(int32) # SIGNED PUSH(<half>(LHS * RHS)) |
bits 15-8 | bits 7-0 |
0xEC | must be zero |
(since: Addition 3)
Divide the two top 16-bit integer.
RHS := <half>POP(int32) LHS := <half>POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<half>(LHS / RHS)) |
bits 15-8 | bits 7-0 |
0xED | must be zero |
(since: Addition 3)
Divide the two top 16-bit signed integer.
RHS := <half>POP(int32) # SIGNED LHS := <half>POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<half>(LHS / RHS)) |
bits 15-8 | bits 7-0 |
0xEE | must be zero |
(since: Addition 3)
Unsigned modulo operation on the two top 16-bit integer.
RHS := <half>POP(int32) LHS := <half>POP(int32) IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<half>(LHS % RHS)) |
bits 15-8 | bits 7-0 |
0xEF | must be zero |
(since: Addition 3)
Signed modulo operation on the two top 16-bit signed integer.
RHS := <half>POP(int32) # SIGNED LHS := <half>POP(int32) # SIGNED IF RHS == 0 THEN RAISE DivisionByZeroException ENDIF PUSH(<half>(LHS % RHS)) |
bits 15-8 | bits 7-0 |
0xF0 | opdata |
(since: Addition 3)
Shift left the top 16-bit integer by an immediate integer.
RHS := <half>POP(int32) LHS := <half>opdata PUSH(<half>(LHS << RHS)) |
bits 15-8 | bits 7-0 |
0xF1 | must be zero |
(since: Addition 3)
Shift left.
RHS := <half>POP(int32) LHS := <half>POP(int32) PUSH(<half>(LHS << RHS)) |
bits 15-8 | bits 7-0 |
0xF2 | must be zero |
(since: Addition 3)
Rotate right.
RHS := <half>POP(int32) LHS := <half>POP(int32) PUSH(LHS rotate_right RHS) |
bits 15-8 | bits 7-0 |
0xF3 | must be zero |
(since: Addition 3)
Perform the bit-wise not operation on the top 16-bit integer.
WORD := <half>POP(int32) PUSH(<half>(~WORD)) |
bits 15-8 | bits 7-0 |
0xF4 | opdata |
(since: Addition 3)
Extend the sign of an opdata-bit value to 32-bit value.
IF opdata > 32 OR 0 == opdata THEN RAISE BadProgramAccessException ENDIF IF opdata < 32 THEN WORD := POP(int32) SIGNBIT := 1 << (opdata - 1) IF WORD & SIGNBIT THEN WORD := WORD | ~(SIGNBIT - 1) ENDIF PUSH(WORD) ENDIF |
The following description contains the default meaning of the standard (built-in) exceptions. These exceptions can be raised by hand in any program. It is recommended to use the following meaning.
This exception can be raised in case of code generation erros. Users should not raise and should not get this exception. The global exception ID must be 0.
This exception is raised when performs an illegal access. For example using dup.i with bad size, or calling dvtf when no DVT is allocated.
This exception is raised when invalid memory access is detected. For example PC leaves the executable memory area.
This exception is used to indicate a stack overflow or a stack underflow error.
This exception is used to indicate that the opcode of the current instruction is unknown.
This exception used to indicate that there is no more memory. Usually raised when allocating new string, record or sequence.
Integer or float division by zero. This exception raised when call any division by zero (/ or %).
This exception raised automatically by any function when no return statement found.
Bad index used in accessing to an element of a sequence or to a character of a string.
Bad record field addressing. Actually not used, but the virtual machine can raise this exception when the compiler generates invalid code.
Used by built-in file and directory functions.
Constraint of a built-in type has been violated.
The virtual machine raises this exception when the given function pointer is invalid. This exception used in development, thus currently unused.
This exception will be raised when an invariant() function returns false.
When a precondition evaluated to false, the program will raise this exception.
When a postcondition evaluated to false, the program will raise this exception.
When an assertion evaluated to false, the program will raise this exception.
Raised when an error occured during an I/O operation. For example: file not found, read from end of file.
When the invocation stack exceed its maximum size, an InvocationException will be raised.
Raised the unicode convert function got an invalid argument, such as an invalid (or not supported) unicode sequence.
Raised when an illegal sequence is found in an input data.
Raised when a read function cannot read the specified number of bytes due to reached EOF.