home *** CD-ROM | disk | FTP | other *** search
- CLKTIMER - Clock and task performing TSR (v2.10s)
- Copyright 1992 by Roger Brook
-
- MEMORY REQUIREMENT: less than 5K bytes
-
- INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h, 66h
-
- PURPOSE: A TSR to perform tasks at designated times. Tasks that can
- be performed include displaying the current time (and
- optionally date) in the upper right hand corner of the
- screen, sounding and displaying an alarm in the upper left
- hand corner of the screen, booting the computer, and
- forcing keystrokes into the keystroke buffer to start or
- terminate a DOS program.
-
- Keystroke tasks (a sequence of keystrokes) can be performed
- at a set time, each hour at a specified number of minutes
- after the hour, or after the computer has been idle for a
- specified number of seconds.
-
- CLKTIMER is intended to used in a batch file to set up a
- sequence of tasks to be performed on an unattended basis.
- CLKTIMER can be run anytime, with new tasks added to the list
- of tasks to be performed, or old tasks disabled.
-
- SYNTAX: CLKTIMER /[a,b,c,d,i,r,w,x][u,a,d] [nn[:nn]] [string]
-
- The slash is interpreted as the start of another delimited
- argument on the command line; therefore every argument must
- begin with a slash. The square brackets in the syntax line
- above denote optional parameters, and should not be used as a
- part of the arguments. Recognized arguments are listed
- below. Any unrecognized argument will cause the program to
- display a help screen of information similar to this syntax
- section. Arguments can be concatenated upto the allowed
- length of the command line (or a maximum of 256 characters).
-
- Recognized arguments which must follow immediately after the
- slash are (case not significant):
-
- a = set alarm time and message
- can set only one time for each of 24 hours per day;
- alarm will both chime and display the specified
- message; chime will end when the next key is pressed
- by the user; message displayed for one minute.
-
- b = set boot time
- can set only one time for each of 24 hours per day;
- computer will boot at the beginning of the minute
- of the hour specified; it is not sensitive to
- whatever is happening (i.e. ignorant of any user).
-
- c = set clock only display
- will disable date display if it was previously set;
- display is in reverse video in the upper right hand
- corner of the screen
-
- d = set clock and date display
- will override clock only display if it was
- previously set; display is in reverse video in the
- upper right hand corner of the screen
-
- h = toggle chime for sounding the hour; if set to sound
- chime at the beginning of each hour, the chime will
- be disabled; if the chime was disabled (default) it
- will be set to chime at the beginning of each hour
-
- i = set idle time (seconds) and command
- idle time count is reset for each key pressed by the
- user; this task is aware of the user and will not
- interrupt or interfere with any DOS program
-
- r = set repeat time (minutes after the hour) and command
- can set only one time for the task to be repeated
- each hour; this task is aware of the user and will
- not interrupt or interfere with any DOS program;
- task will be skipped if a DOS program is active at
- the beginning of the minute specified (DOS aware
- added for version 2.01s; not true for version 2.0s)
-
- s = display the current task settings
-
- w = set time to wait until executing a command
- can set only one time increment (hours and minutes)
- from the current time for the task to be executed;
- this task is aware of the used and will not interrupt
- or interfere with any DOS program; task will be
- skipped if a DOS program is active at the beginning
- of the minute computed
-
- x = set execute time and command
- can set only one time for each of 24 hours per day;
- this task is aware of the user and will not
- interrupt or interfere with any DOS program; task
- will be skipped if a DOS program is active at the
- beginning of the minute of the hour specified
-
- Secondary flags which must follow immediately after the
- argument character are:
-
- a = mark this task to be done only if a DOS program is
- not running at the specified time
-
- u = mark this task to be done at the specified time, even
- if a DOS program is running
-
- d = delete the task previously set for the time specified
-
- For example:
-
- CLKTIMER /a 12:00 'LUNCH TIME' set an alarm for 12:00
- (noon) to display the
- message LUNCH TIME
-
- CLKTIMER /ad 12:00 disable the alarm
- previously set for 12:00,
- but keep the same display
- string
-
- Specifying the time is done in a 24 hour format for alarm
- times, boot times and time to execute a task, and uses two
- number separated by a colon ( : ); a zero will be assumed if
- the number of minutes is not specified. For the repeat time
- (minutes after the hour) and the idle time (number of
- seconds) only a single number is used. Hours must be in the
- range [0..23], minutes and seconds must be in the range
- [0..59]. A blank in the time specification will be assumed
- to be a zero.
-
- The command string or alarm display string are after the time
- specification for the argument. The string is generally a
- combination of text delimited by quote marks ( ' ) and
- representations of special keystrokes. Special keystrokes
- include any decimal ASCII representation of a keystroke (for
- example the carriage return or enter key is 013), or a scan
- code which begins with the at sign ( @ ). Scan codes are not
- tested for accuracy, only inserted into the keystroke buffer.
- Therefore, extended keyboard scan codes can be used if your
- computer recognized an extended keyboard. Since the keyboard
- buffer is manipulated directly, there can be a maximum of 16
- keystrokes specified.
-
- The first time the program is run, the task settings
- specified are loaded with the TSR version of the program. If
- the program is already loaded, then the arguments will modify
- the task settings of the TSR version of the program (i.e.
- will change the memory resident data storage).
-
- DEFAULTS:
- a time defaults to 00:00
- display defaults to a null string or previous setting
- task is DOS unaware
- there are no alarms set initially
-
- b boot time defaults to 00:00
- task is DOS unaware
- there are not boot times set initially
-
- c clock display defaults to off
- task is DOS unaware
-
- d date and clock display defaults to off
- task is DOS unaware
-
- h hour chime defaults to off (not sounded)
- task is DOS unaware
-
- i time defaults to 300 seconds
- command defaults to 'C:\IDLE' 013 or previous setting
- task is DOS aware
- the idler timer defaults to off
-
- r time defaults to 00 minutes after each hour
- command defaults to 'C:\REPEAT' 013 or previous setting
- task is DOS aware
- there is no repeat time set initially
-
- w time defaults to 00:00 increment from the current time
- command defaults to 'C:\WAIT' 013 or previous setting
- task is DOS aware
- there is not wait time set initially
-
- x time defaults to 00:00
- command defaults to 'C:\EXECUTE' 013 or previous setting
- task is DOS aware
- there are no execute times set initially
-
- EXAMPLES:
- CLKTIMER /a 16:45 'Clean up time'
- set an alarm task for 4:45 pm to display Clean up time
-
- CLKTIMER /b2:59
- set a task to boot the computer at 2:59 am
-
- CLKTIMER /c /h
- set two tasks, one to display the clock in the upper
- right hand corner of the display (this will disable the
- date display if previously set) and one to toggle the
- hour chime (will be turned on if this is the first time
- CLKTIMER is run)
-
- CLKTIMER /D
- set a task to display the date and time in the upper
- right hand corner of the display
-
- CLKTIMER /h
- toggle the hour chime (turn it on if previously off, or
- turn it off if previously on)
-
- CLKTIMER /I 60
- set a task to monitor the idle status of the computer
- and to start the program C:\IDLE after the computer has
- been idle for 60 seconds
-
- CLKTIMER /i60 'C:\bat\idle.bat' 013
- set a task to monitor the idle status of the computer
- and to start the batch program C:\BAT\IDLE.BAT after the
- computer has been idle for 60 seconds
-
- CLKTIMER /ru55
- set a task to start the program C:\REPEAT at 55 minutes
- after every hour (24 hours per day); task will be DOS
- unaware (will be done even if a DOS program is running)
-
- CLKTIMER /S
- display the current status and list of tasks set for the
- copy of CLKTIMER which is resident in memory (TSR)
-
- CLKTIMER /w1:00 'wait_1hr' 13
- set a task that at 1 hr and 00 minutes from the current
- time will start the program WAIT_1HR (the DOS PATH will
- be searched for the program)
-
- CLKTIMER /x9:20 'at9_20' 13
- set a task that at 9:20 am will start the program AT9_20
- (the DOS PATH will be searched for the program)
-
- CLKTIMER /da /h /i120 /a12:00'LUNCH TIME' /B2
- set a task to display date and time (date and time task
- is DOS aware, and so will not display if a DOS program
- is running), toggle the hour chime, set a task to monitor
- the idle status and start the program C:\IDLE after 120
- seconds of being idle, set an alarm task to display
- LUNCH TIME at 12:00 (noon) and set a task to boot the
- computer at 2:00 am
-
- CAUTIONS: DOS BIOS calls have been used as much as possible
- to help maintain compatibility with different operating
- system implementations. The major exception is the direct
- manipulation of the keyboard buffer.
-
- Time information is take directly from the BIOS data area,
- and so program may not work correctly if your BIOS does not
- follow PC-DOS convention for location of this information.
-
- Date information is obtained from DOS when the program is
- first run, and then updated internally. It should be aware
- of leap years, and varying number of days per month. Changing
- the date from the command line will not change the date
- displayed by CLKTIMER
-
- The information written to the screen is updated
- approximately once each second. If it scrolls off the top of
- the screen, wait one second and it should reappear.
-
- Software interrupt 66h is used to communicate between the
- currently running version of the program and the TSR version
- in memory. This is an arbitrary choice, and can be changed
- in your registered version if you tell me which software
- interrupt you desire to use.
-
- CLKTIMER looks for itself only in low memory. Therefore, it
- is recommended that the program not be loaded high using
- DOS 5.0 or similar utilities.
-
- The time, date and alarm information will only be displayed
- for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
- In other screen modes, all other functions (including chimes)
- still work.
-
- Windows 3.0: the boot feature and the chimes will work when
- Windows is running; there will be no screen display unless
- you have a DOS window running; the function of the keystroke
- buffer under Windows has not been investigated.
-
- UPGRADES: Version 2.01 fixed timer jump error which caused date to be
- incremented after each minute of the first hour of the day;
- changed time routine to get timer information directly from
- BIOS data area instead of using 1Ah interrupt; moved repeat
- code so that it is executed only if DOS is not active
- (as specified in documentation). 31Aug92
-
- Version 2.02 fixed jump error caused by change to repeat code
- in version 2.01; execute command now performs correctly, when
- previously the code was being skipped; also decreased size
- of execute strings by 1 so their size matches specifications.
- 11Sep92
-
- Version 2.03 fixed jump error causing alarm information to not
- be displayed when clock time or date information were not
- displayed. 24Sep92
-
- Version 2.04 fixed problem with location of crt status byte
- which was causing the computer to lock up if switched from
- VGA to MDA mode. 23Oct92
-
- Version 2.1 added /w command to wait specified hours and
- minutes from current time to stuff a command to keyboard.
- 05Oct92
-
- Version 3.0 added the secondary U and A flag to signify for
- each task type whether they should be DOS unaware (U) or
- aware (A). The default awareness level of each task remains
- are specified in version 2.xx. Also added division routine
- so that time displayed is correctly 18.2065 ticks per second.
- Changed the format of the display and logic to show only task
- events which are active. Fixed problem with conflict between
- wait task and boot tasks. 29Nov92
-
- DISCLAIMER: The program described above has been tested with MSDOS 3.3
- and MSDOS 5.0, and when running under 4DOS and NDOS using
- several hardware clones. While it appears to perform
- consistently as described, there is absolutely no guarantee
- that it will do anything. The author will not be responsible
- for any loss or damages caused through the use of this
- program. No warranty, express or implied, is provided for
- this software, it's performance, or it's usefulness for a
- particular purpose.
-
- All trademarks mentioned are the property of their respective
- owners.
-
- The program is Copyright 1992 by Roger Brook.
-
- You are encouraged to distribute this program under the
- following conditions:
-
- - all files contained in the archive or distribution disk
- must be distributed together in UNMODIFIED form
-
- - you charge no more than a reasonable fee for copying or
- subscription, and clearly indicate that payment of such
- a fee does NOT grant ownership of the program
-
- You may evaluate this program for up to 30 days on a free
- trial basis. After 30 days, you should register your
- continued use of this program. The registration fee is $10
- for use on a single computer (please specify disk size
- desired), payable to the author at the address given below.
- Site license requests in writing will be considered.
-
- Realistically, I don't expect to get rich from this effort.
- Registration will get you a copy of the latest version of the
- software, without the registration encouragement blurb. I
- will listen to and attempt to incorporate suggestions from
- registered users. If your suggestion is used, you will
- receive a free copy of the updated program.
-
- Send comments and registration to:
-
- Roger Brook
- 523 Oakdale Drive
- Haslett MI 48840
-
- I do have a CompuServe and a Prodigy account, but I do not
- monitor them on a regular basis. If you want to send
- your comments by electronic mail, sent them to either:
-
- internet BROOK@MAILBOX.AGE.MSU.EDU
- bitnet BROOK@MSUEGR
-
-
- ------------------------------------------------------------------------
-
- REGISTRATION REQUEST FORM
-
-
- PROGRAM: # COPIES: AMOUNT:
-
- CLKTIMER v3.0 ($10 per copy) _________ $______________
-
- Diskette Type Required: 5-1/4" (360K) ___
-
- 3-1/2" (720K) ___
-
- TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
-
-
- PAYMENT BY:
-
- Check/Money Order No.__________ enclosed for $____________________
-
-
- SHIPPING ADDRESS:
-
- NAME ______________________________________________
-
- ADDRESS LINE 1 ______________________________________________
-
- ADDRESS LINE 2 ______________________________________________
-
- CITY/STATE/PROVINCE ______________________________________________
-
- COUNTRY/POSTAL CODE ______________________________________________
-
- DAYTIME PHONE ______________________________________________
-
- FAX PHONE ______________________________________________
-
- SEND TO: Roger Brook
- 523 Oakdale Drive
- Haslett MI 48840
-
- ------------------------------------------------------------------------
-
-