|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
mars.mips.hardware.Register
public class Register
Abstraction to represent a register of a MIPS Assembler.
Constructor Summary | |
---|---|
Register(String n,
int num,
int val)
Creates a new register with specified name, number, and value. |
Method Summary | |
---|---|
void |
changeResetValue(int reset)
Change the register's reset value; the value to which it will be set when resetValue() is called. |
String |
getName()
Returns the name of the Register. |
int |
getNumber()
Returns the number of the Register. |
int |
getResetValue()
Returns the reset value of the Register. |
int |
getValue()
Returns the value of the Register. |
int |
getValueNoNotify()
Returns the value of the Register. |
void |
resetValue()
Resets the value of the register to the value it was constructed with. |
int |
setValue(int val)
Sets the value of the register to the val passed to it. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Register(String n, int num, int val)
n
- The name of the register.num
- The number of the register.val
- The inital (and reset) value of the register.Method Detail |
---|
public String getName()
public int getValue()
public int getValueNoNotify()
public int getResetValue()
public int getNumber()
public int setValue(int val)
val
- Value to set the Register to.
public void resetValue()
public void changeResetValue(int reset)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |