4 ; Idle event and alarm handling
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
35 ; idle_removeAllAlarms
38 [ :LNOT::DEF:idle__dfn
41 ; --- idle_handler ---
43 ; On entry: R0 == how frequently to call
44 ; R1 == pointer to routine to call
45 ; R2 == R10 value to call routine with
46 ; R3 == R12 value to call routine with
48 ; On exit: May return an error
50 ; Use: Adds a routine to the idle handler list. Later added
51 ; routines are called first. The idle handing routine
52 ; may corrupt R10 and R12.
56 ; --- idle_removeHandler ---
58 ; On entry: R0 == How frequently it was called
59 ; R1 == pointer to routine called
60 ; R2 == R10 value routine is called with
61 ; R3 == R12 value routine is called with
65 ; Use: Removes a routine from the idle handler list.
67 IMPORT idle_removeHandler
69 ; --- idle_setAlarm ---
71 ; On entry: R3 == Time to call
72 ; R1 == pointer to routine to call
73 ; R2 == R10 value to call routine with
74 ; R3 == R12 value to call routine with
76 ; On exit: May return an error
78 ; Use: Adds a alarm to be called. The idle handing routine
79 ; may corrupt R10 and R12.
83 ; --- idle_removeAlarm ---
85 ; On entry: R0 == When it was to be called
86 ; R1 == pointer to routine called
87 ; R2 == R10 value routine is called with
88 ; R3 == R12 value routine is called with
92 ; Use: Removes a routine from the idle handler list. It has
93 ; no effect if it doesn't exist.
95 IMPORT idle_removeAlarm
97 ; --- idle_removeAllAlarms ---
99 ; On entry: R0 == R10 value to look for
103 ; Use: Removes all alarms with the handle that was passed to them
104 ; to be put into R10. You should not remove an alarm within
108 IMPORT idle_removeAllAlarms
116 ; Use: Initialises the idle system.
122 ;----- That's all, folks ----------------------------------------------------