Super
Super()
Set User/Supervisor Mode
Opcode = 32 ($20)
This function is used to change between the 68000 processor's user and
supervisor modes. Though most programs operate in user mode, certain
operations on the ST can only be performed from supervisor mode. These
include reading or writing to system variables stored in memory locations
below 2048 ($800), and reading or writing to hardware registers located
above 167444482 ($FF80000).
C macro format
long stack, oldstack;
oldstack = Super(stack);
Machine language format
stack, - (sp)
#$20,-(sp)
move.l
move.w
trap
addq.l
Inputs
stack
#1
#6,sp
long
Results
DO oldstack long
The address of the stack area to use after
the mode change.
0 = Use same stack for supervisor and
user modes.
-1L = read (don't change) current privi
lege mode.
If the mode was toggled, the address of the old su
pervisor stack is returned here. If stack was set to
- 1L, the value here is a flag indicating the current
privilege mode:
0 = User
1 = Supervisor
258