home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************/
- /* */
- /* AMITSRS.C List TSRs using the alternate multiplex interrupt */
- /* Public Domain 1992 Ralf Brown */
- /* Version 0.80 */
- /* Last Edit: 4/19/92 */
- /* */
- /* Must be compiled in a large data model (compact recommended) */
- /* ex. TCC -mc AMITSRS */
- /* */
- /************************************************************************/
-
- #include <stdio.h>
- #include <dos.h>
-
- int main(int argc,char **argv)
- {
- int mpx ;
- int did_banner = 0, verbose = 0 ;
- union REGS regs ;
- char far *sig ;
-
- /* prevent 'unused parameters' warnings */
- (void)argv ;
- /**/
- /* if any commandline arguments, turn on verbose mode */
- /**/
- if (argc > 1)
- verbose = 1 ;
- /**/
- /* loop through all 256 multiplex numbers, listing each signature we find */
- /**/
- for (mpx = 0 ; mpx <= 255 ; mpx++)
- {
- regs.h.ah = mpx ;
- regs.h.al = 0 ; /* installation check */
- int86(0x2D,®s,®s) ;
- if (regs.h.al == 0xFF) /* installed? */
- {
- if (!did_banner)
- {
- printf("Manufact Product\t\tDescription\n") ;
- printf("-------- -------- ----------------------------------------------\n") ;
- did_banner = 1 ;
- }
- sig = MK_FP(regs.x.dx,regs.x.di) ;
- printf("%8.8s %8.8s %.61s\n",sig,sig+8,sig+16) ;
- /**/
- /* if we were asked for a verbose display, also display TSR version */
- /* and private API entry point (if present) on a second line */
- /**/
- if (verbose)
- {
- printf("%18sversion %d.%02d","",regs.h.ch,regs.h.cl) ;
- regs.h.ah = mpx ;
- regs.h.al = 1 ; /* get private entry point */
- int86(0x2D,®s,®s) ;
- if (regs.h.al == 0xFF)
- printf(" entry point %04.4X:%04.4X ",regs.x.dx,regs.x.bx) ;
- else
- printf(" no private entry point") ;
- printf("\n") ;
- }
- }
- }
- if (!did_banner)
- printf("No TSRs are using the alternate multiplex interrupt\n") ;
- return 0 ;
- }
-