-
Notifications
You must be signed in to change notification settings - Fork 0
/
ijvm.conf
25 lines (25 loc) · 1.39 KB
/
ijvm.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// configuration file for IJVM Assembler
0x10 BIPUSH byte // Push byte onto stack
0x59 DUP // Copy top word on stack; push onto stack
0xA7 GOTO label // Unconditional jump
0x60 IADD // Pop two words from stack; push their sum
0x7E IAND // Pop two words from stack; push Boolean AND
0x99 IFEQ label // Pop word from stack; branch if it is zero
0x9B IFLT label // Pop word from stack; branch if it is less than zero
0x9F IF_ICMPEQ label // Pop two words from stack; branch if equal
0x84 IINC varnum const // Add a constant to a local variable
0x15 ILOAD varnum // Push local variable onto stack
0xB6 INVOKEVIRTUAL offset // Invoke a method
0xB0 IOR // Pop two words from stack; push Boolean OR
0xAC IRETURN // Return from method with integer value
0x36 ISTORE varnum // Pop word from stack; store in local variable
0x64 ISUB // Pop two words from stack; push their difference
0x13 LDC_W index // Push constant from constant pool onto stack
0x00 NOP // Do nothing
0x57 POP // Delete word on top of stack
0x5F SWAP // Swap the two top words on the stack
0xC4 WIDE // Prefix instruction; next instruction has 16-bit index
0xFF HALT // halt the simulator
0xFE ERR // print ERROR and halt
0xFD OUT // Pop a word from the stack and use the low order 8-bits as an ASCI character to display on screen
0xFC IN // Read a character from standard input and put it in the low order 8-bits of a word pushed onto the stack