syscall

Initiate system services.

Format

This is a SYS format instrucion.
31 - 26 25 - 0
110000
0000 0000 0000 0000 0000 0

Functional Description

The system call instruction unconditonally changes the NPC to the predefined address of an operating system handler. It places the current PC into the EPC register, and also sets SPR(0) to 1, indicating that the machine is executing in privileged mode. The exception cause register is also logically ored with the value 0x2.

NPC = &OS_TRAP_HANDLER;
SPR(0) = 0x1;
SPR(1) = PC;
SPR(2) = SPR(2) | 0x2;

Side Effects

None.

Processor Mode

This is a user-level instruction.


Last modified: Fri Feb 23 02:56:02 CST 2001