Showing changes from revision #3 to #4:
Added | Removed | Changed
Entry | |
---|---|
R0 | 14 (&0E) |
R1 | Event Number |
Exit | |
---|---|
R0 | Preserved |
R1 | Old enable state (0 means was already disabled) |
R2 | Corrupted |
The purpose of this call is to enable 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 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.