Class BaseMemory
java.lang.Object
io.zucchini.circuitsimtester.api.BaseMemory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
load
(int address) Reads a word from this RAM/ROM.void
load
(InputStream stream) Loads a stream of a dat file into this component's memory.abstract void
store
(int address, int value) Writes a word to this RAM/ROM.
-
Constructor Details
-
BaseMemory
public BaseMemory()
-
-
Method Details
-
load
public abstract int load(int address) Reads a word from this RAM/ROM.- Parameters:
address
- The memory address to load from- Returns:
- value at this address
-
store
public abstract void store(int address, int value) Writes a word to this RAM/ROM.- Parameters:
address
- The memory address to store tovalue
- The value to store
-
load
Loads a stream of a dat file into this component's memory. Format is the same as the .dat files saved in the CircuitSim memory editor window.- Parameters:
stream
- the stream of the .dat file to be loaded
-