|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Syscall
Interface for any MIPS syscall system service. A qualifying service must be a class in the mars.mips.instructions.syscalls package that implements the Syscall interface, must be compiled into a .class file, and its .class file must be in the same folder as Syscall.class. Mars will detect a qualifying syscall upon startup, create an instance using its no-argument constructor and add it to its syscall list. When its service is invoked at runtime ("syscall" instruction with its service number stored in register $v0), its simulate() method will be invoked.
Method Summary | |
---|---|
String |
getName()
Return a name you have chosen for this syscall. |
int |
getNumber()
Return the assigned service number. |
void |
setNumber(int num)
Set the service number. |
void |
simulate(ProgramStatement statement)
Performs syscall function. |
Method Detail |
---|
String getName()
void setNumber(int num)
num
- specified service number to override the default.int getNumber()
void simulate(ProgramStatement statement) throws ProcessingException
statement
- ProgramStatement for this syscall statement.
ProcessingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |