Class SyscallSeek

java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallSeek
All Implemented Interfaces:
Syscall

public class SyscallSeek extends AbstractSyscall
Service to seek position of file descriptor given in $a0. $a1 specifies offset and $a2 specifies whence. New position of file descriptor is returned in $v0.
  • Constructor Details

    • SyscallSeek

      public SyscallSeek()
      Build an instance of the syscall with its default service number and name.
  • Method Details

    • simulate

      public void simulate(BasicStatement statement) throws SimulatorException
      Performs syscall function to seek position of file descriptor given in $a0. $a1 specifies offset and $a2 specifies whence. New position of file descriptor is returned in $v0.
      Specified by:
      simulate in interface Syscall
      Specified by:
      simulate in class AbstractSyscall
      Parameters:
      statement - BasicStatement object for this syscall instruction.
      Throws:
      SimulatorException