<< Previous | Next >>

SETUSR     Set User Mode     Rabbit 3000A/4000/5000 Instruction

Opcode
Instruction
Operation
ED 6F SETUSR SU={SU[5:0],0x01}

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 3000A/4000
4
n/a
n/a
Rabbit 5000
4
4
2

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

Description

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. SETUSR shifts the contents of SU 2 bits to the left, then sets bit 1 to 0 and bit 0 to 1, signifying user mode.

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