|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.Registers
This data class contains all the register information. The registers are accessed via index numbers which are defined in the TTK91CPU interface.
Field Summary | |
private int[] |
registerValues
This field contains the register values. |
Constructor Summary | |
Registers()
|
Method Summary | |
private int |
getIndex(int TTK91Cpu_index)
Converts TTK91Cpu register to the corresponding index to registerValues array. |
private int |
getIndex(java.lang.String registerName)
Converts given String to the corresponding index to registerValues array. |
int |
getRegister(int registerId)
Returns the value of a register. |
int |
getRegister(java.lang.String registerName)
Returns the value of a register. |
void |
setRegister(int registerId,
int value)
Sets a new value to a register. |
void |
setRegister(java.lang.String registerName,
int value)
Sets a new value to a register. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int[] registerValues
Constructor Detail |
public Registers()
Method Detail |
public int getRegister(int registerId)
registerId
- Identifying number of the register.
public int getRegister(java.lang.String registerName)
registerName
- The name of the register.
public void setRegister(int registerId, int value)
registerId
- The identifying number of the register.value
- New value to set.public void setRegister(java.lang.String registerName, int value)
registerName
- The name of the register.value
- New value to set.private int getIndex(int TTK91Cpu_index)
TTK91Cpu_index
- Register index in TTK91Cpu notation
private int getIndex(java.lang.String registerName)
registerName
- The name of the register.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |