$a1 = upper bound of range of returned values. $a0 contains the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
Sets the seed of the corresponding underlying Java pseudorandom number generator ( ). $a1 = seed for corresponding pseudorandom number generator. of pseudorandom number generator (any int). See note below tableĭisplayed value is 8 hexadecimal digits, left-padding with zeroes if necessary.ĭisplayed value is 32 bits, left-padding with zeroes if necessary. Generate tone and return upon tone completion. This timing will not be precise, as the Java implementation will add some overhead. $a0 = the length of time to sleep in milliseconds.Ĭauses the MARS Java thread to sleep for (at least) the specified number of milliseconds. Services 30 and higher are exclusive to MARS. Services 1 through 17 are compatible with the SPIM simulator, other than Open File (13) as described in the Notes below the table. $v0 contains number of characters written (negative if error). $v0 contains number of characters read (0 if end-of-file, negative if error). $a2 = maximum number of characters to read $v0 contains file descriptor (negative if error). $a0 = address of null-terminated string containing filename $a1 = maximum number of characters to read $a0 = address of null-terminated string to print Retrieve return values, if any, from result registers as specified.Įxample: display the value stored in $t0 on the consoleĪdd $a0, $t0, $zero # load desired value into argument register $a0, using pseudo-op Load argument values, if any, in $a0, $a1, $a2, or $f12 as specified. MIPS register contents are not affected by a system call, except for result registersĪs specified in the table below. Intro Settings Syscalls IDE Debugging Command Tools History Limitations Exception Handlers Macros Acknowledgements MARS home SYSCALL functions available in MARS IntroductionĪ number of system services, mainly for input and output, are available for use by