home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCTFE.C < prev    next >
C/C++ Source or Header  |  1993-03-30  |  656b  |  39 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 = 0xfe;
  21.  
  22.     printf("\nEnter Pacing : ");
  23.     printf("\nA) None   B) Rx XON\XOFF  C) Tx XON\XOFF  D) Rx & Tx XON\XOFF ");
  24.     ch = toupper(getch());
  25.     if(ch == 'A') ch = 0;
  26.     else
  27.         if(ch == 'B') ch = 0x40;
  28.         else
  29.             if(ch == 'C') ch = 0x80;
  30.             else
  31.                 if(ch == 'D') ch = 0xC0;
  32.  
  33.     regs.h.al = ch;
  34.     regs.x.dx = dx;
  35.     int86(0x14,®s,®s);
  36.     printf("\nAX : %04X  CX : %04X ",regs.x.ax,regs.x.cx);
  37.  
  38.  
  39. }