Supervisor Calls
Certain instructions are trapped or intercepted by the operating system, and interpreted as requests for additional service
Implementation:
- Reserve a block of unused instructions, say SVC(0) through SVC(255), for use by programs
- Attach a conventional meaning to each, e.g.,
- ReadCh = SVC(0) : Read a character from console, return its ASCII code in r0.
- TypeCh = SVC(1) : Pop an ASCII code from the stack, display the character on console.
- PrintCh = SVC(2) : Pop a character code, print the corresponding character to a printer.
- Use an illegal instruction fault to trap SVCs