<< Previous | Next >>

SETSYSP mn     Return From User Interrupt     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
ED B1 n m SETSYSP mn SU={SU[1:0],SU[7:2]}
tmplow = (SP)
tmphigh = (SP + 1)
SP = SP + 2
if {tmp != mn}
System Violation

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 2000/3000/4000
12
n/a
n/a
Rabbit 5000
12
10
8

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

Description

This instruction is used to handle user mode interrupts in system/user mode. It sets the current processor mode to the previous processor mode by rotating two places to the right the bits of SU. Bits 1 and 0 are moved to bit positions 7 and 6 respectively. The System/User Mode Register, SU, is an 8-bit register that forms a stack of the current processor mode and the previous 3 modes.

This is a chained-atomic instruction, meaning that an interrupt cannot take place between this instruction and the instruction following it.


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