Really easy question here (for someone who knows what they are doing that is). I'm trying to enter Supervisor mode in C by using the Super() function prototyped in tos.h.
In assembly, the supervisor mode is called and the old stack pointer is saved (by you). When you want to drop out, pass the old sp and run Super() again. Job done, no mess, no fuss.
The function in C returns a long and requires a void pointer as a parameter. I would have thought that the return value would have been the old stack pointer, but it can't be if it's a long, can it?
My question is:
What is the correct way to enter Supervisor Mode? How would I then leave it later?
Atarian since 1989. Atari 1040STFM, 4MB 520STe with UltraSatan and Unitor N, A dodgy 1 MBSTe that bombs out after a few minutes, and a 14MB 48MHz Falcon 030 with NetUSBee and Soundpool 8 channel DAC. Plus my new MiST!