Work / Virtual Machine / Instruction Set
2012-01-14 21:38:15
Stack
PSHI (PUSH 32-BIT INTEGER VALUE)
Usage:
1 2 3 | pshi n ; push integer value n onto the stack |
Operation:
- Reads integer value from bytecode and pushes it onto the stack.
PSHW (PUSH 16-BIT INTEGER VALUE)
Usage:
1 2 3 | pshw n ; push 16-bit integer value n onto the stack |
Operation:
- Reads 16-bit integer value from bytecode and pushes it onto the stack.
PSHB (PUSH 8-BIT INTEGER VALUE)
Usage:
1 2 3 | pshb n ; push 8-bit integer value n onto the stack |
Operation:
- Reads 8-bit integer value from bytecode and pushes it onto the stack.
PUSH (PUSH LOCAL VARIABLE)
Usage:
1 2 3 | push n ; push value of local variable n onto the stack |
Operation:
- Reads the value of the specified local variable and pushes it onto the stack.
PSH2 (PUSH 2 LOCAL VARIABLES)
Usage:
1 2 3 | psh2 n, m ; push values of specified local variables n and m onto the stack |
Operation:
- Reads the value of the specified local variables and pushes them onto the stack in the order specified.
PSH3 (PUSH 3 LOCAL VARIABLES)
Usage:
1 2 3 | psh3 n, m, l ; push values of specified local variables n, m and l onto the stack |
Operation:
- Reads the value of the specified local variables and pushes them onto the stack in the order specified.
PSHD (PUSH DATA ADDRESS)
Usage:
1 2 3 | pshd n, m ; comment |
Operation:
- operation
POP (POP INTO LOCAL VARIABLE)
Usage:
1 2 3 | pop n, m ; comment |
Operation:
- operation
POPR (POP CALL RETURN)
Usage:
1 2 3 | popr n, m ; comment |
Operation:
- operation
POPN (DECREMENT STACK TOP)
Usage:
1 2 3 | popn n, m ; comment |
Operation:
- operation
IESP (INCREMENT STACK TOP)
Usage:
1 2 3 | iesp n, m ; comment |
Operation:
- operation
DESP (DECREMENT STACK TOP)
Usage:
1 2 3 | desp n, m ; comment |
Operation:
- operation
IESPI (INCREMENT STACK TOP BY VALUE)
Usage:
1 2 3 | iespi n, m ; comment |
Operation:
- operation
DESPI (DECREMENT STACK TOP BY VALUE)
Usage:
1 2 3 | despi n, m ; comment |
Operation:
- operation
stack frames / local variables
MOV (COPY LOCAL VARIABLE)
Usage:
1 2 3 | mov n, m ; comment |
Operation:
- operation
MOVI (SET LOCAL VARIABLE TO INTEGER VALUE)
Usage:
1 2 3 | movi n, m ; comment |
Operation:
- operation
MOVF (SET LOCAL VARIABLE TO FLOATING-POINT VALUE)
Usage:
1 2 3 | movi n, m ; comment |
Operation:
- operation
MOVW (COPY 16-BIT LOCAL VARIABLE)
Usage:
1 2 3 | movw n, m ; comment |
Operation:
- operation
MOVB (COPY 8-BIT LOCAL VARIABLE)
Usage:
1 2 3 | movb n, m ; comment |
Operation:
- operation
MOVD (LOAD DATA ADDRESS INTO LOCAL VARIABLE)
Usage:
1 2 3 | movd n, m ; comment |
Operation:
- operation