Implement system call and exception handling. You must support all of the system calls defined in syscall.h, except for thread fork, yield, exec and join (these system calls require multiprogramming, and as pointed out above, this assignment only supports the execution of one process at a time). We have provided an assembly-language routine, ``syscall'', to invoke the system call in Nachos from a C program (UNIX has something similar - try `man syscall').
Note that you will need to ``bullet-proof'' the Nachos kernel from user program errors - there should be nothing a user program can do to crash the operating system (with the exception of explicitly asking the system to halt). The list of exceptions you should handle is in machine.h. The code for implementing the exception handlers is very simple (not more than 2-3 lines of code).
To support the system calls that access the console device, you will need to implement a SynchConsole class, that provides the abstraction of synchronous access to the console. progtest.cc has the beginnings of a SynchConsole implementation. For now, your SynchConsole class should just provide the capability of writing and reading from the console. For this, your SynchConsole routines will simply use the I/O routines that the Console class provides (see console.cc and console.h in the machine directory). For the next lab, you will have to modify your implementation to handle multiple processes reading and writing to the console.