Unit BBSAlarm;



interface

{***************************************************************************}

{***************************************************************************}



Var

  AlarmOn: boolean;



Function  AlarmCheck: boolean;

Procedure AlarmInit;

Procedure AlarmToggle;



implementation

{***************************************************************************}

{***************************************************************************}

Uses

  Dos,

  Globals;



Function AlarmCheck: boolean;

{***************************************************************************}

var

  DayOfWeek,

  Hour,

  Min: word;

  Temp: boolean;

begin

  Temp := false;

  GetDate(DumWord, DumWord, DumWord, DayOfWeek);

  GetTime(Hour, Min, DumWord, DumWord);

  if DayOfWeek in [1..5] then

    if Hour = 6 then

      if Min = 20 then

        begin

          write(Beep);

          Temp := true;

        end;

  AlarmCheck := Temp;

end;



Procedure AlarmInit;

{***************************************************************************}

begin

  AlarmOn := true;

end;



Procedure AlarmToggle;

{***************************************************************************}

begin

  AlarmOn := not(AlarmOn);

end;



{***************************************************************************}

{***************************************************************************}

{***************************************************************************}



begin

  AlarmInit;

end.