public final class MoveInstruction
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Target |
destination |
static java.lang.String |
NAME |
| Constructor and Description |
|---|
MoveInstruction(Target source,
Target destination) |
| Modifier and Type | Method and Description |
|---|---|
void |
onBeforeWriteComplete(MachineImpl machine,
Port port)
Take action based on pending write operation completion, e.g.
|
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.
|
java.lang.String |
toString() |
public static final java.lang.String NAME
protected final Target destination
public void step(Machine machine)
Instructionmachine - the machine to run the instruction on.public java.lang.String toString()
toString in class java.lang.Objectpublic void onBeforeWriteComplete(MachineImpl machine, Port port)
InstructiononBeforeWriteComplete in interface Instructionmachine - the machine the operation will finish on.port - the port the operation will finish on.Module.onBeforeWriteComplete(Port)public 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.