Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Detect supervisor mode?
Posted by: Per Almered (XiA) Sep,23.2009-22:12 

For the demo I'm working on, I have a LOADER.PRG in the AUTO folder, which then loads the actual DEMO.PRG with a standard PEXEC.

However, since I want people to be able to run it from harddisk too, I want the user to be able to start it from DEMO.PRG aswell.

The problem is that when DEMO.PRG exits (when it's been PEXEC:ed from LOADER.PRG), the computer crashes, and I suspect the reason is that LOADER.PRG runs in supervisor mode, as does DEMO.PRG. I'm thinking a solution would be if DEMO.PRG detects if the Atari is already in supervisor mode, and if so, simply runs without setting supervisor mode itself.

But how do I detect if I'm in supervisor mode? Or is there a better way to solve this problem?

The reason LOADER.PRG is in supervisor mode, by the way, is that it places a tiny animation on $70, and that animation needs to be in supervisor mode.


Thanks in advance,

Per.







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Detect supervisor mode? Per Almered (XiA) Sep,23.2009-22:12
  Re: Detect supervisor mode? lp060 Sep,24.2009-05:46
    Re: Detect supervisor mode? Per Almered (XiA) Sep,24.2009-11:19
    Re: Detect supervisor mode? Stabylo Sep,24.2009-11:23
      Re: Detect supervisor mode? Per Almered (XiA) Sep,24.2009-20:19
        Re: Detect supervisor mode? Grazey / PHF Sep,24.2009-20:43
  Re: Detect supervisor mode? Dbug Sep,24.2009-23:32
    Re: Detect supervisor mode? Per Almered (XiA) Sep,25.2009-14:39
    Re: Detect supervisor mode? Per Almered (XiA) Sep,25.2009-17:15
      Re: Detect supervisor mode? Dbug Sep,26.2009-10:40


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson