 |
OSSetSR |
Function (ROM Call 0x29C) |
Sets the processor status register.
OSSetSR sets the processor status register to SR. Supervisor and
trace bits cannot be set up using this routine. For example, use
OSSetSR (0x0700);
to disable all interrupts, and
OSSetSR (0x0000);
to enable them again. Note that any call to keyboard input routines
like ngetchx etc. will enable interrupts
again.
OSSetSR returns the previous contents of the status register.
Note: Disabling Auto-Int 1 is often used for making the status line indicators
not visible on the screen so that the status indicators do not mess up your graphics
(status line indicators are updated from this interrupt). In this case, you need to
read the keyboard using _rowread function, because
functions like ngetchx are based on Auto-Int 1.
However, if you disable interrupts, the grayscale will not work, because the grayscale
is also based on Auto-Int 1. To solve this problem, instead of disabling
Auto-Int 1, you may redirect it to nothing. See DUMMY_HANDLER
from intr.h for more info.
Used by: Dialog, ERD_dialog, HomeExecute, kbhit, ngetchx, pushkey, ROM Call 0x3EA