All Packages Class Hierarchy This Package Previous Next Index
Class duckMachine.architecture.Memory
java.lang.Object
|
+----duckMachine.architecture.Memory
- public class Memory
- extends Object
- implements MemoryI
The memory unit of the machine.
-
Memory()
-
-
Memory(int)
-
-
fetch(Word)
- Returns the contents of a specified address.
-
getSize()
-
-
store(Word, Word)
- Stores a word in a specified address.
Memory
public Memory()
Memory
public Memory(int s)
getSize
public int getSize()
fetch
public Word fetch(Word addr) throws MemoryE
- Returns the contents of a specified address.
- Parameters:
- addr - The address.
- Throws: MemoryE
- If the address is out of range.
- See Also:
- Word
store
public void store(Word addr,
Word word) throws MemoryE
- Stores a word in a specified address.
- Parameters:
- addr - The address.
- word - The object to store in the address.
- Throws: MemoryE
- If the address is out of range.
- See Also:
- Word
All Packages Class Hierarchy This Package Previous Next Index