home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCT6_2.C < prev    next >
C/C++ Source or Header  |  1993-07-29  |  870b  |  41 lines

  1.  
  2. #include <dos.h>
  3. #include <stdio.h>
  4.  
  5. main()
  6. {
  7.  
  8. struct REGPACK  sregs;
  9.  
  10. int     y,x,numbytes,dx,bnum;
  11. char    *type[] = {"COM/XI","MC/XI ","PC/Xe ","PC/Xi ","PC/Xm ","C/X   ",
  12.                    "PC/2e ","MC/2e ","PC/Xem"};
  13.  
  14. union REGS regs;
  15.  
  16.     printf("\nEnter DX : ");
  17.     scanf("%d",&dx); while(kbhit()) getch();
  18.     printf("\nEnter Board Number : ");
  19.     scanf("%d",&bnum); while(kbhit()) getch();
  20.  
  21.     sregs.r_ax = 0x0602;
  22.     sregs.r_bx = bnum;
  23.     sregs.r_dx = dx;
  24.     intr(0x14,&sregs);
  25.  
  26.     if((sregs.r_ax & 0xff00) == 0xff00)
  27.     {
  28.         printf("\nERROR");
  29.         return(0);
  30.     }
  31.  
  32.     printf("\nIRQ        : %02X ",(sregs.r_ax>>8)&0xff );
  33.     printf("\nBoard Type : %s",type[(sregs.r_ax&0xff)-1]);
  34.     printf("\nWindow     : %04X ",sregs.r_bx);
  35.     printf("\nPORT       : %04X ",sregs.r_dx);
  36.     printf("\nChannels   : %04X ",sregs.r_cx);
  37.     printf("\nDX Low     : %04X ",sregs.r_si);
  38.  
  39.  
  40. }
  41.