Date: Sat, 30 Apr 94 19:52:48 EST Path: cdrom.com!barrnet.net!biosci!agate!howland.reston.ans.net!EU.net!news.forth.gr!ars.ath.forthnet.gr!tonyp From: tonyp@ars.ath.forthnet.gr Newsgroups: comp.publish.cdrom.software Organization: Athens Remote Systems-Forum Online Information Network,Gree Message-ID: <04272EYEVKQTEQHNWXJ@ars.ath.forthnet.gr> Subject: Re: Q: how to identify DO Lines: 62 [Quoting Bmslib@mitvma.m to All in a msg dated 04-30-94 12:13] IB> I am looking for a proceedure or shareware that returns to me what IB> drive letter a CD-ROM is installed at. It is probably in the DOS IB> table somewhere or something that MSCDEX knows. IB> Thanks. IB> Dr. W. Curtiss Priest Here it is in Turbo Pascal 6.0+ (assembly really): --------------------------------------------------------------------- { ************************************************************** * Routine : CDDRive * * Purpose : Return the drive letter of the first CDROM in * * : drive as a character letter. The function is * * : True if a CDROM is installed, False otherwise. * * Written by: Tony Papadimitriou (tonyp@ars.ath.forthnet.gr) * ************************************************************** } function CDDrive(var drive: Char): Boolean; assembler; asm mov ax,$1500 mov bx,0 int $2F mov al,False { assume False } cmp bx,1 jb @exit add cl,'A' { calculate drive letter } les bx,drive mov es:[bx],cl mov al,True @exit: end; { CDDrive } --------------------------------------------------------------------- To test it: var drive: Char; begin if CDDrive(drive) then Writeln('The CD-ROM is drive '+drive+':') else Writeln('No CD-ROM is installed'); end. Tony P. *======================================================* | Tony Papadimitriou | Internet addresses: | | P.O. Box 14386 | ptoutouz@atlas.uoa.ariadne-t.gr | | Athens 11510 | tonyp@ars.ath.forthnet.gr | | Greece | | *======================================================* ... Mail:P.O.Box 14386,Athens 11510,Greece-EMail:tonyp@ars.ath.forthnet.gr ___ Blue Wave/QWK v2.12 ------------------------------------------------------------------------ Sent via ARS_FORUM_ONLINE INFORMATION SYSTEM ATHENS GREECE (301) 6450566 Professional Information and Entertainment Services Serving the online community since 1987, more than 350.000 callers