public class Loop extends java.lang.Object implements Instruction
Constructor and Description |
---|
Loop(int numIterations,
InstructionList instructionList)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getCPUClocks()
The number of the CPU clocks the instruction takes to execute
|
void |
run(CPUCore cpuCore)
The implementation of the instruction
|
java.lang.String |
toString() |
public Loop(int numIterations, InstructionList instructionList)
numIterations
- Number of iterationsinstructionList
- Body of the looppublic final void run(CPUCore cpuCore)
Instruction
run
in interface Instruction
cpuCore
- The CPU core where the instruction is runningpublic int getCPUClocks()
Instruction
getCPUClocks
in interface Instruction
public java.lang.String toString()
toString
in class java.lang.Object