All Packages Class Hierarchy This Package Previous Next Index
Interface duckMachine.architecture.MachineI
- public interface MachineI
The interface of the hardware machine.
-
getIO()
-
-
getMem()
-
-
getProc()
-
-
load(Enumeration)
- Accepts a list of machine words together with the addresses in which
they should be loaded.
-
run(InsVisitor)
- Accepts an object that visits all the instructions from the current
one until it encounters a HALT instruction.
-
step(InsVisitor)
- Accepts an object that visits the current instruction.
getMem
public abstract MemoryI getMem()
getProc
public abstract ProcessorI getProc()
getIO
public abstract ioUnitI getIO()
step
public abstract void step(InsVisitor iv) throws MachineE
- Accepts an object that visits the current instruction.
- Throws: MachineE
- If an the execution of the instruction causes
the machine to raise an exception.
run
public abstract void run(InsVisitor v) throws MachineE
- Accepts an object that visits all the instructions from the current
one until it encounters a HALT instruction.
- Throws: MachineE
- If an error occurs during the execution of
one of the instructions.
load
public abstract void load(Enumeration loadableWords) throws MemoryE
- Accepts a list of machine words together with the addresses in which
they should be loaded. Writes the words into the appropriate
memory addresses.
- Throws: MemoryE
- If attempt to store a word in an
out-of-range address.
All Packages Class Hierarchy This Package Previous Next Index