home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCTFD.C < prev    next >
C/C++ Source or Header  |  1993-03-30  |  583b  |  36 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;
  11.     char    ch;
  12.  
  13.     union REGS regs;
  14.     /*struct SREGS sregs;*/
  15.  
  16.  
  17.     printf("\nEnter DX : ");
  18.     scanf("%d",&dx); while(kbhit()) getch();
  19.  
  20.     regs.h.ah = 0xfd;
  21.  
  22.     printf("\nA) RX count   B) Tx count ");
  23.     ch = toupper(getch());
  24.     if(ch == 'A') ch = 2;
  25.     else
  26.         if(ch == 'B') ch = 1;
  27.         else ch = 0;
  28.  
  29.     regs.h.al = ch;
  30.     regs.x.dx = dx;
  31.     printf("\nCall   - AH : %02X     AL : %02X",regs.h.ah, regs.h.al);
  32.     int86(0x14,®s,®s);
  33.     printf("\nReturn - CX : %04X ",regs.x.cx);
  34.  
  35.  
  36. }