h6. [[OS SWI Calls]] h6(. » [[OS_Byte]] h6((. » OS_Byte 13 h2. OS_Byte 13 h5. (SWI &06) |_<^{width:3em}. Entry | | |<^. R0|<^. 13 (&0D) | |<^. R1|<^. [[Event Numbers|Event Number]]| |_<^{width:3em}. Exit|_<^. | |<^. R0|<^. Preserved | |<^. R1|<^. Old enable state (0 means was already disabled) | |<^. R2|<^. Corrupted | h4. Use The purpose of this call is to disable an event. h4. Notes 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]] h4. See also * [[Event Numbers]] * [[EventV]] * [[OS_Byte]] * [[OS_Byte 14]]