home *** CD-ROM | disk | FTP | other *** search
- Document concerning the module 'TimeOut' v0.04 :
- ++++++++++++++++++++++++++++++++++++++++++++++
-
-
- *************************** Copyright Notice **************************
- * *
- * The object code and documentation for the 'TimeOut' module are *
- * the exclusive copyright of John A.M. TYTGAT and are freely *
- * distributable, provided this notice is left intact and all of the *
- * files listed below are included, UNALTERED. *
- * *
- *************************************************************************
-
-
- Files included :
- ==============
-
- (1) The 'TimeOut' module v1.04 : "TimeOut"
- (2) The help file : "HelpTimeOut"
- (3) An example BASIC program : "ExTimeOut"
-
- AIM :
- ===
-
- 'TimeOut' generates after a certain amounth of time an user-defined error.
- This can be very handy in programs where you have to leave an infinite loop
- after a certain amounth of time or where there is a time limitation in a
- subroutine (ex. in serial communication).
- You have to setup a local error routine (see the example BASIC file
- "ExTimeOut") checking if it is a TimeOut error or not.
-
- How to use it ?
- =============
-
- The module 'TimeOut' does only support SWI's. Some characteristics of the
- module are :
-
- Module title : 'TimeOut'
- Module help : 'Watchdog timer'
- SWI chunk base number : &C0080
- Error base number : &30080
- SWI group prefix : 'TimeOut'
-
- Currently defined SWI are :
-
- SWI "TimeOut_Duration",R0 TO R0,R1
- ----------------------------------
-
- DESC. | Reads/Writes the TimeOut duration in csecs
- ENTRY | If R0 = 0 Reads the TimeOut duration
- If R0 <> 0 Writes the TimeOut duration
- EXIT | R0 = Old TimeOut duration
- R1 = Time left till the following TimeOut
- COMM. | SWI is re-entrant
- MODES | All
-
- This SWI sets the length of time in csecs between 'SWI "TimeOut_Start"' and
- the TimeOut error as long as the program didn't issue a 'SWI "TimeOut_Stop"'.
- The default TimeOut duration is 100 csecs.
-
- SWI "TimeOut_String",R0
- -----------------------
-
- DESC. | Sets the TimeOut error string
- ENTRY | R0 = Pointer to the TimeOut error string (max. 252 chars)
- EXIT | -
- COMM. | SWI is not re-entrant
- MODES | All
-
- Using this SWI you can change the default TimeOut error string ("TimeOut
- runs out of time").
-
- SWI "TimeOut_Start"
- -------------------
-
- DESC. | Starts the TimeOut count-down
- ENTRY | -
- EXIT | -
- COMM. | SWI is not re-entrant as it disables IRQ
- MODES | All
-
- Before the actually count-down is started the counter is reseted.
-
- SWI "TimeOut_Stop"
- ------------------
-
- DESC. | Stops the TimeOut count-down
- ENTRY | -
- EXIT | -
- COMM. | SWI is not re-entrant as it disables IRQ
- MODES | All
-
- Using this SWI is the only way to prevent the TimeOut error generation.
-
- How it works ?
- ============
-
- Well, the counter is made using the TickerV vector. If the counter reaches
- zero the module uses in the TickerV interrupt routine a SWI "OS_AddCallBack"
- to add a CallBack routine where the TimeOut error is generated using a SWI
- "OS_GenerateError". I have to use the CallBack principle because it seems it
- is not possible to generate an error in a interrupt routine. Mind if you
- switch off the interrupts the counter isn't updated, so the TimeOut module
- would not work.
-
- Errors :
- ======
-
- &30080 : User defined, default 'TimeOut' message is "'TimeOut' runs out of time"
- &30081 : "Unknown TimeOut SWI operation"
- &30082 : "TimeOut error string is too long"
-
- Versions :
- ========
-
- v0.04 : First public domain version
-
- BASS :
- ====
-
- Module 'TimeOut' is released as a BASS product. BASS (Belgian Archimedes
- Software-writers Society) is group of young enthousiast software-writers who
- like to write Archimedes public domain programs. If you want to know more
- about us, please feel free to contact us !
-
-
- Conditions of use :
- =================
-
- This software is supplied "as is"; no warranty, express or implied, of the
- merchantability of this software or its fitness for any particular purpose
- is given. In no circumstances shall the providers of this software be
- liable for any damage, loss of profits, or any indirect or consequential
- loss arising out of the use of this software or inability to use this
- software.
-
- You are free to give this application to anyone you please via any medium,
- provided it is delivered with ALL the supplied files, UNALTERED. You may
- NOT sell this software, or use it otherwise for personal gain. If you wish
- to post it on your Bulletin Board or include it in your Shareware library
- then that, too, is fine.
-
- A large number of hours of work have gone into the production and
- maintenance of this module and although I have supplied the application
- free, donations will be gratefully received.
-
- Please report any bugs you find to me, so that other users may benefit from
- improved versions. I cannot guarantee to fix any bugs, but I will do my
- best.
-
-
- My address is:
-
- John TYTGAT
- Brusselbaan 445
- B-1600 St.-Pieters-Leeuw
- BELGIUM
-
- © BASS 1991