h6. [[OS SWI Calls]] h6(. » [[OS_Byte]] h6((. » OS_Byte 14 h2. OS_Byte 14 h5. (SWI &06) |_<^{width:3em}. Entry | | |<^. R0|<^. 14 (&0E) | |<^. 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 enable 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 enables a particular event so that it is broadcast through [[EventV]] (the event vector). When your program is no longer interested in the event, it must call [[OS_Byte 13]] so that the event can be silenced if no other programs are interested in it. Under RISC OS 5, if the reference counter for an event reaches its maximum value then the counter will be locked to that value, preventing further OS_Byte 13 / OS_Byte 14 calls from having any effect. This is a safety feature to prevent the event being inadvertently disabled, e.g. if 300 calls to OS_Byte 14 are followed by 299 calls to OS_Byte 13. Currently each counter is a single byte (giving a maximum value of 255), but this may change in future OS versions. h4. See also * [[Event Numbers]] * [[EventV]] * [[OS_Byte]] * [[OS_Byte 13]]