mars.mips.instructions.syscalls
Class SyscallOpen

java.lang.Object
  |
  +--mars.mips.instructions.syscalls.AbstractSyscall
        |
        +--mars.mips.instructions.syscalls.SyscallOpen
All Implemented Interfaces:
Syscall

public class SyscallOpen
extends AbstractSyscall

Service to open file name specified by $a0. File descriptor returned in $a0.


Constructor Summary
SyscallOpen()
          Build an instance of the Open file syscall.
 
Method Summary
 void simulate(ProgramStatement statement)
          Performs syscall function to open file name specified by $a0.
 
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyscallOpen

public SyscallOpen()
Build an instance of the Open file syscall. Default service number is 13 and name is "Open".

Method Detail

simulate

public void simulate(ProgramStatement statement)
              throws ProcessingException
Performs syscall function to open file name specified by $a0. File descriptor returned in $a0. Note that Read/Write mode ($a2) is not implemented and flags ($a1) are ignored.

Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement - ProgramStatement object for this syscall instruction.
ProcessingException