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