sim
Class RAM
java.lang.Object
  |
  +--sim.RAM
- All Implemented Interfaces: 
 - Memory
 
-  class RAM
- extends java.lang.Object
- implements Memory
   
Implements a simple, random-access memory
| 
Field Summary | 
(package private)  byte[] | 
data
 
            | 
 
| 
Constructor Summary | 
RAM(int size)
 
            | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
data
byte[] data
RAM
public RAM(int size)
doCycle
public void doCycle()
- Specified by:
 doCycle in interface Memory
 
 
getSize
public int getSize()
- Specified by:
 getSize in interface Memory
 
 
toString
public java.lang.String toString()
- Overrides:
 toString in class java.lang.Object
 
 
initialize
public void initialize()
- zero out memory.
- Specified by:
 initialize in interface Memory
 
 
 
readWord
public int readWord(int address)
- Specified by:
 readWord in interface Memory
 
 
readByte
public byte readByte(int address)
- Specified by:
 readByte in interface Memory
 
 
writeWord
public void writeWord(int address,
                      int value)
- Specified by:
 writeWord in interface Memory
 
 
writeByte
public void writeByte(int address,
                      byte value)
- Specified by:
 writeByte in interface Memory