<< Previous | Next >>

SETSYSP mn     Return From User Interrupt     Rabbit 4000 Instruction
Opcode
Instruction
Clocks
Operation

ED B1 n m

SETSYSP mn

12 (2,2,2,2,2,2)

SU={SU[1:0],SU[7:2]}
tmplow = (SP)
tmphigh = (SP + 1)
SP = SP + 2
if {tmp != mn}
System Violation


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.


<< Previous | Next >>