Instruction Set


The instruction set is summarized in the table below. Clicking on any mnemonic (except NOP) will take you to another page with a more complete description of the instruction, the microcode that interprets the instruction, and an example program.

Mnemonic Opcode Operand Action
BIPUSH 0x10 1-byte signed integer Push the operand onto the stack
DUP 0x59 Duplicate the top of the stack value
ERR 0xFE Display "ERROR" and terminate program execution
GOTO 0xA7 2-byte signed offset Branch unconditionally
HALT 0xFF Terminate program execution
IADD 0x60 Integer addition
IAND 0x7E Bitwise AND
IFEQ 0x99 2-byte signed offset Branch if the element on the top of the stack is equal to zero
IFLT 0x9B 2-byte signed offset Branch if the element on the top of the stack is less than zero
IF_ICMPEQ 0x9F 2-byte signed offset Branch if the top two elements on the stack are equal
IINC 0x84 1-byte offset,
1-byte signed value
Increment a local variable by a given amount
ILOAD 0x15 1-byte offset Copy the value of a  variable onto the stack
IN 0xFC Push a byte from the input buffer onto the stack
INVOKEVIRTUAL 0xB6 2-byte offset Invoke a method (subroutine)
IOR 0xB0 Bitwise OR
IRETURN 0xAC Return from a method
ISTORE 0x36 1-byte offset Pop the top element from the stack and copy it to a local variable
ISUB 0x64 Integer subtraction
LDC_W 0x13 2-byte offset Push a constant onto the stack
NOP 0x00 No Operation (Does nothing)
OUT 0xFD Pop the top element from the stack and write the character in the low-order 8 bits to the output window
POP 0x57 Pop the top element from the stack
SWAP 0x5F Swap the top two elements on the stack
WIDE 0xC4 The next instruction has a wide operand.