{$A+,B-,D+,E-,F-,G+,I+,L+,N-,O-,R-,S-,V-,X+}
{$M 16384,0,655360}
program CDDemo;
uses CDDrive;

var
  Version: word;
begin
  if GetNumberOfCDROMDrives = 0 then
    writeln( 'This machine has no CD-ROM drive.' )
  else
    begin
      Version := GetCDROMVersion;
      writeln( 'MSCDEX v', hi(Version), '.', lo(Version) );
      Lock;
      writeln( 'Lock: Error = ', CDROMError );
      Unlock;
      writeln( 'Unlock: Error = ', CDROMError );
      Eject;
      writeln( 'Eject: Error = ', CDROMError );
      Close;
      writeln( 'Close: Error = ', CDROMError );
      Reset;
      writeln( 'Reset: Error = ', CDROMError )
    end
end.
