<< Previous | Next >>

FSYSCALL     System Call     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
ED 55 FSYSCALL (SP - 1) = PChigh
(SP - 2) = PClow
(SP - 3) = SU
SP = SP - 3
PC = {IIR,0x60}
SU = {SU[5:0],00}

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 4000
15
n/a
n/a
Rabbit 5000
16
16
14

Flags ALTD IOI/IOE
S
Z
L/V
C
F
R
SP
S
D
-
-
-
1
·

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.


Rabbit Instructions << Previous | Next >> rabbit.com