Entry | |
---|---|
R0 | 13 (&0D) |
R1 | Event Number |
Exit | |
---|---|
R0 | Preserved |
R1 | Old enable state (0 means was already disabled) |
R2 | Corrupted |
The purpose of this call is to disable an event.
Event enable/disable states are reference-counted, to ensure that events are only broadcast to the system if at least one program is interested in receiving them.
This call decreases the count of enable requests for a particular event being called though the EventV (event vector). When the count reaches 0 the event is actually disabled.
Care should be taken to match OS_Byte 13 calls with OS_Byte 14 as the event will be locked on if the count goes negative. To avoid this situation, turn the event on again via OS_Byte 14 to get its state, then call OS_Byte 13 to reset to the previous state and finally only call OS_Byte 13 if the state returned via the OS_Byte 14 was not 0.
Events are enabled by calling OS_Byte 14