
PROGRAM JPlay;

(* copyright (c) 1988 by Neil J. Rubenking *)
(* Demonstration program for Turbo Pascal  *)
(* 4.0 UNIT "PLAYIT".                      *)


USES Crt, graph, jdrivers, JPlayIt;


VAR
  StopChar : Char;
  graphdriver,graphmode:integer;


{$l inventn4.obj}
procedure inventn4;  external;
{$l preludio.obj}
procedure preludio;  external;
{$l habanera.obj}
procedure habanera;  external;
{$L CMINOR.OBJ}
PROCEDURE CMINOR;    EXTERNAL;
{$L Hitchkok.obj}
PROCEDURE HITCHKOK;  EXTERNAL;



BEGIN

  if registerbgidriver(@jcga) < 0 then halt(2);
  if registerbgidriver(@jegavga) < 0 then halt(3);

  graphdriver:=detect;
  initgraph(graphdriver,graphmode, '');


  ClrScr;
  StopChar := #0;
  REPEAT
    playobj(@inventn4, true, stopchar);
    playobj(@preludio, true, stopchar);
    playobj(@habanera, true, stopchar);
    PlayOBJ(@CMINOR  , TRUE, StopChar);
    PlayOBJ(@HITCHKOK, TRUE, StopChar);
  UNTIL StopChar <> #0;
  textmode(co80);
  window(18,8,62,16);
  textbackground(red);
  clrscr;
  window(20,9,60,15);
  textbackground(green);
  clrscr;
  window(22,10,58,14);
  textbackground(blue);
  textcolor(white);
  clrscr;
  writeln(' ');
  writeln('    Brought to you from the lab of');
  textcolor(red+blink);
  writeln('             JewlTronics');
  textcolor(white);
  writeln('            Kannapolis NC');
  window(1,1,80,25);
  textbackground(black);
  textcolor(white);
  gotoxy(1,20);
  writeln('                                                                 ');
  gotoxy(1,20);
END .

