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. This is a safety measure to prevent the event being inadvertently silenced if a bug causes OS_Byte 13 to be called too many times.
It is possible to safely read the event enable count by making a call to OS_Byte 14 followed by a call to OS_Byte 13. However unless you can control or predict when other systems are going to enable or disable the event, this information may be of limited use.
Events are enabled by calling OS_Byte 14