public final class InstructionMove
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Target |
destination |
| Constructor and Description |
|---|
InstructionMove(Target source,
Target destination) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStep(Machine machine) |
void |
onWriteCompleted(Machine machine,
Port port)
Finish a write operation started by the instruction, usually by
advancing the program counter.
|
void |
reset()
Reset the state of the instruction if it has any.
|
void |
step(Machine machine)
Update the instruction, when it is done it must increment the machine's
program counter itself.
|
java.lang.String |
toString() |
protected final Target destination
protected void doStep(Machine machine)
public java.lang.String toString()
toString in class java.lang.Objectpublic void step(Machine machine)
Instructionstep in interface Instructionmachine - the machine to run the instruction on.public void reset()
Instructionreset in interface Instructionpublic void onWriteCompleted(Machine machine, Port port)
InstructionInstructions must always await or cancel a write operation they started.
onWriteCompleted in interface Instructionmachine - the machine the operation finished on.port - the port the operation finished on.