program alarm;

{$MODE OBJFPC}

uses sysutils,unix;

Var uHH,uMM, HH,MM,SS,MS: Word;

begin

if ParamCount < 2 then begin Writeln('Use:  alarm 12 08  for 12:08 time'); Halt(0); end;

uHH := StrToInt(ParamStr(1));
uMM := StrToInt(ParamStr(2));

writeln(uhh, ' ', umm);

while true do begin

DecodeTime(Time,HH,MM,SS,MS);
Writeln(format('The time is %d:%d:%d',[hh,mm,ss]));

if (uhh = hh) and (umm = mm) then begin

fpSystem('gorg64_spkplay');
Halt;
end;

Sleep(1000);

end;

end.