{***********************************************************************}
{									}
{ __ToTicIsr  Convert time to ticks since midnight			}
{									}
{ procedure __ToTicIsr(Hours,Mins,Secs,Tics : word;			}
{				  var Ticks : longint); 		}
{									}
{	      Hours	The time to be converted into ticks; Hours,	}
{	      Mins	minutes 					}
{	      Secs	seconds, and					}
{	      Tics	hundreths of seconds				}
{	      Ticks	The returned number of ticks since midnight	}
{			corresponding to the time.			}
{									}
{ Description The BIOS maintains a time-of-day clock that is based on	}
{	      a count of system clock ticks since midnight.  The clock	}
{	      is incremented by the BIOS whenever a timer interrupt	}
{	      (interrupt $08) occurs.  The clock is incremented at the	}
{	      rate of 1193180/65536 times per second; approximately,	}
{	      18.2 times per second.  The purpose of this function is	}
{	      to convert a standard time (hours, minutes, seconds and	}
{	      hundredths of seconds) into ticks since midnight.  The	}
{	      primary use for this function is in conjunction with the	}
{	      POWER TOOLS intervention code, because timer signals are	}
{	      specified in ticks.					}
{									}
{	      The values of the time parameters are forced into a	}
{	      reasonable range.  Any of the values may be large enough	}
{	      to specify the entire day.  For example, Hours can be 23, }
{	      Mins can 1439, Secs and Tics can be at most MAXINT.	}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc.  1987		}
{_______________________________________________________________________}

procedure __ToTicIsr(Hours,Mins,Secs,Tics : word;
				var Ticks : longint);

  var
    TotalTicks : real;
    Temp       : real;

  begin {__ToTicIsr}

    if (Hours > 23) then
       Hours := 23;
    if (Mins > 1439) then
       Mins := 1439;
    Ticks  := Trunc((0.1820648 * Tics) + (18.206481 * Secs) +
		    (1092.3888 * Mins) + (65543.328 * Hours))

  end;	{__ToTicIsr}
