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.


Constructor Index

 o Memory()
 o Memory(int)

Method Index

 o fetch(Word)
Returns the contents of a specified address.
 o getSize()
 o store(Word, Word)
Stores a word in a specified address.

Constructors

 o Memory
 public Memory()
 o Memory
 public Memory(int s)

Methods

 o getSize
 public int getSize()
 o 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
 o 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