I have not tried this, but the status register on the 68K architecture can
change depending on whether you are running in User or Supervisor modes.
If you are in User mode then you do not have access to the interrupt part
of the SR.

I do not know if the Palm forces client code to run in user mode, but it
would certainly be reasonable to do so.

Oliver King-Smith

At 04:10 PM 8/30/99 -0500, you wrote:
>Oliver King-Smith wrote:
>> 
>> You can disable interrupts with out using any assembly.
>> 
>> Just use this code
>> 
>> // This turns off all interrupts
>> Word statusRegister = SysDisableInterrupts();
>> /* Use this next line to turn on the interrupts you want (in this case I
>> turn on everything but level 1).  Use 0x0100 thru 0x0700 to control the
>> levels */
>> SysRestoreInterrupts( (statusRegister&0xF8FF) | 0x0100 );
>> 
>> // Finally you can restore all the interrupts with
>> SysRestoreInterrupts( statusRegister );
>> 
>> I hope this helps.
>
>   It helps a lot.  I was so dead-set on getting my snippet of
>assembly to compile and work I didn't even realize there was
>already a systrap for it.
>
>   I do still wonder why that small piece of assembly fails...
>
>Thanks,
>Daniel.
> 

Reply via email to