|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Register>
com.github.croesch.micro_debug.mic1.register.Register
public enum Register
This enumeration contains the registers of the processor. The registers are described in the script of Karl Stroetmann.
| Enum Constant Summary | |
|---|---|
CPP
The Constant Pool Pointer - it points to the begin of the constant pool |
|
H
this register is a additional register to help storing values. |
|
LV
The Local Variable pointer - it points to the first variable of a method or if parameters are given, to the first parameter |
|
MAR
the Memory Address Register - if something is read/written from/to the memory this register defines the address in the memory where to read/write from/to |
|
MBR
the Memory Byte Register - it is the register that is connected to the program-memory. |
|
MBRU
this register is not a real register an exists only for simulation purpose. It will be filled with the 8-bit-value of the MBR and the highest 24 bits are filled with zeros. |
|
MDR
the Memory Data Register - it is the register that is connected to the memory. |
|
OPC
the Old Program Counter - it is a additional register and has no certain function. |
|
PC
the Program Counter - if something is read from the program-memory this register defines the address in the program-memory where to read from. |
|
SP
The Stack Pointer |
|
TOS
The Top Of Stack - it contains the word that is the top of stack |
|
| Method Summary | |
|---|---|
int |
getValue()
Gets the value currently stored in the register. |
void |
setValue(int val)
Sets the value for that register. |
static Register |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Register[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Register MAR
public static final Register MDR
public static final Register PC
public static final Register MBR
MBRU. In the script of Karl Stroetmann are these two registers
only one, but for simulation purpose we are using both registers to build the functionality of the MBR register.
public static final Register MBRU
public static final Register SP
public static final Register LV
public static final Register CPP
public static final Register TOS
public static final Register OPC
public static final Register H
| Method Detail |
|---|
public static Register[] values()
for (Register c : Register.values()) System.out.println(c);
public static Register valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic void setValue(int val)
val - the new value for the registerpublic final int getValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||