arche
Class Register

java.lang.Object
  |
  +--arche.Storage
        |
        +--arche.Register

public class Register
extends Storage

Simple one-value register as a basic storage for processors.


Field Summary
private  short reg
          For stroing the value.
 
Constructor Summary
Register()
           
 
Method Summary
 void clear()
           
 int getSize()
          Returns the size of the storage element, constant 1 for a register.
 short read()
          Returns the value stored in this register.
 java.lang.String toString()
           
 void write(short newvalue)
          Sets the content to a new value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

reg

private short reg
For stroing the value.
Constructor Detail

Register

public Register()
Method Detail

getSize

public int getSize()
Returns the size of the storage element, constant 1 for a register.
Overrides:
getSize in class Storage

read

public short read()
Returns the value stored in this register.
Overrides:
read in class Storage

write

public void write(short newvalue)
Sets the content to a new value.
Overrides:
write in class Storage

clear

public void clear()
Overrides:
clear in class Storage

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object