|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jfrace.Register
This is a helper class which holds information about a
register of the CPU
. These informations are
PROGRAM_COUNTER
,
DATA_REGISTER
,
ADDRESS_REGISTER
,
STACK_POINTER
,
ACCUMULATOR
, and
STATUS_REGISTER
.
Note that the number of bits has to be less than or equal 32.
Field Summary | |
static int |
ACCUMULATOR
Register type mask. |
static int |
ADDRESS_REGISTER
Register type mask. |
static int |
DATA_REGISTER
Register type mask. |
static int |
PROGRAM_COUNTER
Register type mask. |
static int |
STACK_POINTER
Register type mask. |
static int |
STATUS_REGISTER
Register type mask. |
Constructor Summary | |
Register(int numberOfBits,
int type,
java.lang.String name,
int value)
Create a new instance. |
Method Summary | |
java.lang.String |
getName()
Return the name of the register. |
int |
getNumberOfBits()
Return the number of bits. |
int |
getType()
Return the type of the register. |
int |
getValue()
Return the value of the register. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PROGRAM_COUNTER
public static final int DATA_REGISTER
public static final int ADDRESS_REGISTER
public static final int STACK_POINTER
public static final int ACCUMULATOR
public static final int STATUS_REGISTER
Constructor Detail |
public Register(int numberOfBits, int type, java.lang.String name, int value)
numberOfBits
- the number of bits.type
- the type of the register
(e.g. PROGRAM_COUNTER
).name
- the name of the register.value
- the value of the bits of the register. Only
lowest numberOfBits
are meaningful.Method Detail |
public int getNumberOfBits()
public int getType()
public java.lang.String getName()
null
.public int getValue()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |