Uses Crt,CDROM;

Var a,b,Kol,Track,o:Byte;
    c:LongInt;
    s:String;
Begin
     Play_Track(1);
     Audio_Disk_Info(a,b,c);
     Kol:=b-a+1;
     WriteLn('Playing track #1');
     Repeat
           s:=ReadKey;
           o:=Track;
           If (s='K') And (Track>1) Then Dec(Track);
           If (s='M') And (Track<Kol) Then Inc(Track);
           If o<>Track Then
           Begin
                WriteLn('Playing track #',Track);
                Play_Track(Track);
           End;
     Until (s=#27) Or (s=#32);
     If s<>#32 Then Stop_Audio;
End.