SYSCALL

Synopsis:

System exception call.

Operation:

If call number is a hardware interrupt

    IPC = pc + 4 * I

else

    EPC = pc + 4 * I

pc = mem[Call Number]

Description:

Invoke a system call using the trap table. This instruction takes three or more clock cycles to complete as it flushes the pipeline and fetches the program counter indirectly from the trap address table. If the I flag in the instruction is set, then the PC is incremented by four before being saved in the exception PC register. Setting the I flag in the instruction opcode causes the system call to return to the next instruction which is normally desired. If the I flag is not set then the syscall instruction will return to itself in a loop. This is not normally desired. The increment flag is usually set to zero by the hardware interrupts so that the displaced instruction may be executed after the interrupt is serviced.

Format:

Opcode7 Reserved9 I1 Call Number9 Func7
0 ---- I1 Cn9 23