public interface Instruction
Note that instructions must not have any mutable state! They always operate on the machine given to them, and the pipes connected to that machine. Their only state is their configuration.
| Modifier and Type | Method and Description |
|---|---|
default void |
onBeforeWriteComplete(MachineImpl machine,
Port port)
Take action based on pending write operation completion, e.g.
|
default void |
onWriteCompleted(Machine machine,
Port port)
Finish a write operation started by the instruction, usually by
advancing the program counter.
|
void |
step(Machine machine)
Update the instruction, when it is done it must increment the machine's
program counter itself.
|
void step(Machine machine)
machine - the machine to run the instruction on.default void onBeforeWriteComplete(MachineImpl machine, Port port)
machine - the machine the operation will finish on.port - the port the operation will finish on.Module.onBeforeWriteComplete(Port)default void onWriteCompleted(Machine machine, Port port)
Instructions must always await or cancel a write operation they started.
machine - the machine the operation finished on.port - the port the operation finished on.