FSYSCALL
System Call
Rabbit 4000 Instruction
|
|
ED 55
|
FSYSCALL
|
|
(SP - 1) = PChigh
(SP - 2) = PClow
(SP - 3) = SU
SP = SP - 3
PC = {IIR,0x60}
SU = {SU[5:0],00}
|
Description
Pushes PC and SU on the stack. SU is set to system mode and PC is set to the interrupt vector address represented
by IIR:0x60, where IIR is the address of the interrupt table and 0x60 is the offset into the table.
The address of the vector table can be read and set by the instructions LD A,IIR and LD IIR,A respectively,
where A is the upper nibble of the 16-bit vector table address. The vector table is always on a 0x100
boundary.
FSYSCALL is essentially a new RST opcode, added to allow access to system space without using one of
the existing RST opcodes. It will put the processor into System mode and execute code in the corresponding
interrupt-vector table entry.