tip.vm
Class TipVm
java.lang.Object
tip.vm.TipVm
public class TipVm
- extends Object
Constructor Summary |
TipVm(int[] mem)
|
MEM_SIZE
public static final int MEM_SIZE
- See Also:
- Constant Field Values
HEAP_BASE
public static final int HEAP_BASE
- See Also:
- Constant Field Values
STACK_BASE
public static final int STACK_BASE
- See Also:
- Constant Field Values
OP_ADD
public static final int OP_ADD
- See Also:
- Constant Field Values
OP_SUB
public static final int OP_SUB
- See Also:
- Constant Field Values
OP_MUL
public static final int OP_MUL
- See Also:
- Constant Field Values
OP_DIV
public static final int OP_DIV
- See Also:
- Constant Field Values
OP_IFEQ
public static final int OP_IFEQ
- See Also:
- Constant Field Values
OP_IFNE
public static final int OP_IFNE
- See Also:
- Constant Field Values
OP_IFCMP_EQ
public static final int OP_IFCMP_EQ
- See Also:
- Constant Field Values
OP_IFCMP_GT
public static final int OP_IFCMP_GT
- See Also:
- Constant Field Values
OP_LOADC
public static final int OP_LOADC
- See Also:
- Constant Field Values
OP_LOAD
public static final int OP_LOAD
- See Also:
- Constant Field Values
OP_ALOAD
public static final int OP_ALOAD
- See Also:
- Constant Field Values
OP_STORE
public static final int OP_STORE
- See Also:
- Constant Field Values
OP_MLOAD
public static final int OP_MLOAD
- See Also:
- Constant Field Values
OP_MSTORE
public static final int OP_MSTORE
- See Also:
- Constant Field Values
OP_CALL
public static final int OP_CALL
- See Also:
- Constant Field Values
OP_CALL_INDIRECT
public static final int OP_CALL_INDIRECT
- See Also:
- Constant Field Values
OP_RETURN
public static final int OP_RETURN
- See Also:
- Constant Field Values
OP_GOTO
public static final int OP_GOTO
- See Also:
- Constant Field Values
OP_MALLOC
public static final int OP_MALLOC
- See Also:
- Constant Field Values
OP_INPUT
public static final int OP_INPUT
- See Also:
- Constant Field Values
OP_OUTPUT
public static final int OP_OUTPUT
- See Also:
- Constant Field Values
OP_DEREF
public static final int OP_DEREF
- See Also:
- Constant Field Values
TipVm
public TipVm(int[] mem)
runProgram
public void runProgram()
push
public void push(int value)
pop
public int pop()
malloc
public int malloc()
callFunction
public void callFunction(int function,
int returnAddress)
getLocal
public int getLocal(int index)
setLocal
public void setLocal(int index,
int value)
deref
public int deref(int address)
mstore
public void mstore(int address,
int value)
readInput
public int readInput()