*------------------------------------------------------------------*
|    NAME:     CLOCKON                                             |
|    FUNCTION: Screen Resident Clock                               |
*------------------------------------------------------------------*

This  TSR  program  places  the current time of day in the top right
hand corner of the screen and updates it every second.  CLOCKON  can
have  up to 9 presettable alarms, and they can be examined, added or
cleared at any time.  The first use  of  CLOCKON  will  install  it.
Further  uses  operate  on  the TSR copy.  Options include extending
hourly chime length, enabling or inhibiting the  clock  display  and
uninstalling.  Simply typing CLOCKON will show the status of the TSR
and all currently set alarm times.

When  an  alarm  time  is  detected  a  few  bars of a selected tune
are played. (see /T option)

To find command format, type CLOCKON /?

Usage: CLOCKON [Option(s)] [Time(s)]

Options are:
 /Ann extends alarm tune rate        *
 /Cnn extends clock tick rate        *
 /D   Disables clock display but still allows alarms
 /E   Enables clock display in the top right corner of the screen
 /L   Lists available tune numbers and names
 /M   Displays only hh:mm            *
 /Pnn sets Position of clock
 /R   Resets (clears) all alarms
 /Tnn Selects tune 'nn' (random if 0)
 /U   Uninstalls CLOCKON if possible

(* = only operational at time of actual installation)

Times format:
hh:mm[;n] Up to 9 alarms may be set or added at any time where ;n is
an  optional day of week specifier. (0=Sunday, 1=Monday, etc) to set
the alarm only on the specified day.  If all  week  days  (Mon..Fri)
are  required,  the  letter  "W"  can be used.  If both weekend days
(Sat, Sun) are required, use the letter "E".

Typically,  AUTOEXEC.BAT  would  contain  the  initial definition of
CLOCKON and set some default alarms.


Example:   CLOCKON /R /E 12:00 14:30;E 16:40;W 18:00 21:00;6

This would reset all alarms,  enable  the  display,  set  new  daily
alarms  at  noon and 6:00pm, weekends at 2:30pm, weekdays at 4:40pm,
and 9:00pm on Saturday only.  Further alarms can be added (up to the
maximum 9 alarms) at any time.


                               NOTES

/Ann (0..255) multiplies note length nn times
/Cnn (0..255) multiplies the clock update nn times
(These  were  added  to  cater for fast INT08H interrupt rates.  For
example, many Amstrad computers require /A3 and /C3 to  be  included
in  the  install  command line since the interrupt rate is set to 50
times per second instead of 18.2)

/L Lists available tunes and numbers to use in the /Tnn command.
      Tunes include classical, anthems and oddities.

/Pnn selects the position of clock, where nn is a FOUR DIGIT value.
      The first two digits are the line (line 1 is top line)
      The last two digits are the column (column 1 is left column)
      For HH:MM:SS display default is 0173 (line 1, column 73)
      For HH:MM    display default is 0176 (line 1, column 76)
/P0 or /P resets position to default value

/Tnn selects tune from the tune repertoire provided.
On installation, if /Tnn is not entered or if /T0 is specified, then
CLOCKON  will  randomly  select  from  the  available tunes.  On any
subsequent call, /T[nn] must be used to change the  tune.   However,
if  at  any time /Tnn is greater than the number of available tunes,
then the selection is determined by the  day  of  the  month.   This
allows  for a cyclic tune selection.  The tune will remain fixed for
the whole day.
                      Any more tune suggestions?


On Exit from CLOCKON, the ERRORLEVEL will be set to:

      0 if all OK
      1 if too many alarms requested
      2 if invalid time found
      3 if an error was detected in the command line
      4 uninstall not accomplished - not yet installed
      5 uninstall not accomplished - other chained TSRs follow
      6 no free slots for installation

WARNINGS:

There is a known minor inconsistency with MS WORD V5 - CLOCKON still
works  but  WORD  uses  some of the CLOCKON TSR stack.  However, the
programs do not cause any damage.

Programs  which  have  high  interrupt  rates  (e.g.  communications
programs) may also give problems if display is activated.

NOTE: This program is HILOAD/LOADHI compatible.

Author:         Howard Harvey
Release Date:   5/MAY/94

