public class SysCall extends java.lang.Object implements Instruction
Constructor and Description |
---|
SysCall(SysCallNumber number,
int[] arguments)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getCPUClocks()
The number of the CPU clocks the instruction takes to execute
|
SysCallNumber |
getNumber()
Retrieve the system call's identifier
|
void |
run(CPUCore cpuCore)
The implementation of the instruction
|
java.lang.String |
toString() |
public SysCall(SysCallNumber number, int[] arguments)
number
- The system call identifierarguments
- The system call's argumentspublic SysCallNumber getNumber()
public void run(CPUCore cpuCore) throws java.lang.Exception
Instruction
run
in interface Instruction
cpuCore
- The CPU core where the instruction is runningjava.lang.Exception
- Raised if the instruction accesses resources it should notpublic int getCPUClocks()
Instruction
getCPUClocks
in interface Instruction
public java.lang.String toString()
toString
in class java.lang.Object