ID Number: Q50565
3.20 3.21 3.30 3.30a 4.00 4.01
MS-DOS
Summary:
The MS-DOS Multiplex Interrupt INT 2FH can be used to determine
whether certain MS-DOS memory-resident programs and/or drivers have
been loaded. A call to Interrupt 2FH, with 0x00 in AL and the
signature of a given program in AH, will return the value 0xFFh in AL
if that program is currently loaded in memory.
More Information:
The following C function will return TRUE only if the program whose
signature value is passed in ucSignature is currently loaded in
memory:
int GetLoadStatus(unsigned char ucSignature)
{
union REGS regs;
regs.h.al = 0x00;
regs.h.ah = ucSignature;
int86(0x2F, ®s, ®s);
return !(regs.h.al^0xFF);
}
If the GetLoadStatus() function is called in a loop for all signature
values from 0 to 255, it can be used to enumerate the MS-DOS resident
programs installed in memory. If this is done, the signature value 19
should be skipped because calling INT 2FH with the value 19 in AL
produces a divide-by-zero error.
The signature value for PRINT.COM is 1.