{***********************************************************************}
{									}
{ __FmTicIsr  Convert ticks since midnight into time			}
{									}
{ procedure __FmTicIsr(var Hours,Mins,Secs,Tics : word; 		}
{					  Ticks : longint);		}
{									}
{	      Hours	The returned time converted from ticks; Hours,	}
{	      Mins	minutes 					}
{	      Secs	seconds, and					}
{	      Tics	hundreths of seconds				}
{	      Ticks	The number of ticks since midnight whose	}
{			corresponding time is to be returned.		}
{									}
{ 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 procedure is	}
{	      to convert ticks since midnight into standard time of	}
{	      hours, seconds, minutes and hundreths of seconds (tics).	}
{	      This procedure is useful in conjunction with the		}
{	      POWER TOOLS intervention code, because timer signals are	}
{	      specified in ticks.					}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc.  1987		}
{_______________________________________________________________________}

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

  var
    Temp : real;

  begin {__FmTicIsr}

    Hours := Trunc(Ticks/65543.335);
    Temp  := Ticks - 65543.335 * Hours;
    Mins  := Trunc(Temp/1092.388916);
    Temp  := Temp - 1092.388916 * Mins;
    Secs  := Trunc(Temp/18.206481934);
    Tics  := Trunc((Temp - (18.206481934 * Secs))/0.1820468);

  end;	{__FmTicIsr}
