mars.mips.instructions.syscalls
Class SyscallSbrk
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallSbrk
- All Implemented Interfaces:
- Syscall
public class SyscallSbrk
- extends AbstractSyscall
Service to allocate amount of heap memory specified in $a0, putting address into $v0.
Constructor Summary |
SyscallSbrk()
Build an instance of the Sbrk syscall. |
Method Summary |
void |
simulate(ProgramStatement statement)
Performs syscall function to allocate amount of heap memory specified in $a0, putting address into $v0. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SyscallSbrk
public SyscallSbrk()
- Build an instance of the Sbrk syscall. Default service number
is 9 and name is "Sbrk".
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
- Performs syscall function to allocate amount of heap memory specified in $a0, putting address into $v0.
- Specified by:
simulate
in interface Syscall
- Specified by:
simulate
in class AbstractSyscall
- Parameters:
statement
- ProgramStatement object for this syscall instruction.
- Throws:
ProcessingException