Return-path: ttoyofuk@orion.oac.uci.edu
Newsgroups: bit.listserv.cdromlan
Date:         Mon, 6 Apr 1992 16:34:00 -0700
From:         Anthony Toyofuku <TTOYOFUK@UCI.BITNET>
Subject:      Re: determining if MSCDEX is installed

(I just tried sending this, but I don't think anything happened... here goes
attempt #2).

A while back, I too wanted to know if MSCDEX was loading, so I wrote this
utility (there's probably a built in utilty somewhere that checks to see if
MSCDEX is loaded, but I don't have any manuals, so I don't know of any).
Essentially what mine does is call interrupt 2Fh AX=1100h, which returns the
value of AL = FFh (255 decimal) if MSCDEX is installed.

Here's the source in Turbo Pascal (which will work on any TP compiler,
version 4 and above), but the concept of calling the interrupt is the same
in any language which gives you access to the DOS interrupts.

Note:  interrupt 2Fh AX=1100h is used to check the existence of both MSCDEX
and Network Redirector, therefore if a Network Redirector is installed, it
will return the presence of the Redirector, not MSCDEX.

I've included the UUENCODED version of the binary (executable)
program below. (If you don't know how to UUDECODE, which stands for "Unix to
Unix Decode", talk to your systems administrator).  If anyone wants a copy
on a disk, I'd be happy to give you a copy.  Just let me know.

As an aside, for anyone interested in DOS interrupts, a good reference book is:

Brown, Ralf and Jim Kyle. PC Interrupts: A Programmer's Reference to BIOS,
DOS, and Third-Party Calls. Reading, Massachusetts, 1991.

===============================================================================
Anthony Toyofuku                            Phone:      (714)856-8160
Main Library, Reference                     Internet:   ttoyofuk@orion.uci.edu
University of California, Irvine            Bitnet:     ttoyofuk@uci.bitnet

===============================================================================
______________________________________________________________________________

Program CDEXTest;                     { Tests to see if MSCDEX is installed }

Uses Dos;

{***************************************************************************}

Written by: Tony Toyofuku, UCI Reference Department
Known bugs: Interrupt 2F AX=1100 is used to check both MSCDEX and the Network
            Redirector, therefore if Network Redirector is installed, this
            utility will return the presence of the Redirector, NOT MSCDEX.

{****************************************************************************}

var
   Regs        : registers;
   ReturnState : byte;

begin
   Regs.AX := $1100;                  { Calls interrupt 2F AX=1100h }
   Intr($2F, Regs);
   ReturnState := Regs.AL;            { If AL register = FF hex (255 decimal }
   if ReturnState = $FF then          { then MSCDEX is installed           }
      writeln('MSCDEX installed')
   else writeln('MSCDEX not installed');
end.

_____________________________________________________________________________

Here's the UUENCODED version (this clears the screen first):


begin 644 cdtest
M35JP  @ $@ ' "<$)Z0+ 0!    F    '    "D    N    .    #T   !0
M    ;P   '0   !Y    C0   )(   "7    GP   !< $@ J !( , $2  $
M= #N '0 B@5T                 !1-4T-$15@@;F]T(&EN<W1A;&QE9!!-
M4T-$15@@:6YS=&%L;&5DF@  = ":   2 %6)Y3' FGP"= ":P $2 ,<&1
M$; O4+]$ !Y7F@L "P"@1 "B6 " /E@  7<>OVX!'E>_   .5S' 4)IK!G0
MFN4%= ":1@)T .L<OVX!'E>_%0 .5S' 4)IK!G0 FN4%= ":1@)T %TQP)KI
M '0                     7EI96[ A4%-14E95'HOLG+M%  Y3,]N.VXI>
M#-'CT>/%'QY3Q78(_*U0K8O8K8O(K8O0K8OHK5"MB_BM4*V.P!]>6/K+G 97
M58OLQ'X0_*N+PZN+P:N+PJM8JXO&JUBKC-BK6*M8JQ]=R@8      %6)Y>@H
M +]N !Y7#N@@ []N !Y7F@(#= "_;@$>5P[H#0._;@$>5YH' W0 7<NT#^C6
M!3P'= H\ W8&N , Z%8 Z*$ M @R_^B^!8K$)'^B:@"B8  SP*); *)K *)L
M $"B6@"X0 ".P+]L ":*!28Z!73[)HH%N?__Z$("N#< D??0,]+W\:-F !X.
M'[HM ;@;)<TA'\.Z0 ".PB: )H< _CP'= 8\!'("L -0M #H5P58"N1T+;@2
M$;, Z$H%N# 1MP"R .A !8#Z*G46)H .AP !N  !N0 &Z"P%M!*S(.@E!<.T
M#^@?!5"X,!&W +( Z!0%6+$ "M)U"+(8/ -W K$!BO**U/[*M " _AAV K0!
MHUX B19H (@.70#&!EP  3/ HV( B19D ,-0'KC? ([8@#Y:  !T!<8&;  !
M'UC/@#YL  !U </&!FP  +0!S19T!K0 S1;K]+!>Z!L#L$/H%@/H# /-(XO<
M-HM'!.@C_^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