Topic : Pure Assembler Documentation Author : John Kormylo Version : PASM.HYP 1.0 Subject : Documentation/Pure Assembler Nodes : 740 Index Size : 20262 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : en @default : @help : Help @options : +g -i -s +x +z -t4 @width : 75 View Ref-File[ Supervisor Mode - Privileged Instructions ] When a program starts execution, the CPU will be operating in User Mode. This means that privileged instructions cannot be executed. (These instructions mostly involve access to control registers.) In addition, memory addresses $00 through $7FF cannot be accessed. The only way to enter Supervisor Mode is through an exception. As it happens, all GEMDOS, BIOS, XBIOS, AES and VDI routines are implemented using TRAP exceptions. Code accessed using the operating system jump vectors will be executed in Supervisor Mode. One can also use library functions Super or Supexec to execute in Supervisor Mode. In Supervisor Mode, register SSP (supervisor stack pointer) on the 68000 or registers ISP (interrupt stack pointer) or MSP (master stack pointer) on the 68030 will be used as A7. The User Mode stack pointer can be accessed as USP. One can return to User Mode by setting the mode bits of the status register. The RTE instruction restores the status register to its condition before the exception, returning to User Mode (assuming that the computer was in User Mode when the exception occurred).