home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCT1C.C < prev    next >
C/C++ Source or Header  |  1993-03-30  |  800b  |  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,water,dx;
  11.  
  12. union REGS regs;
  13.  
  14.     printf("\nEnter DX : ");
  15.     scanf("%d",&dx); while(kbhit()) getch();
  16. Choose:
  17.     printf("\nA) Set TX Low Water ");
  18.     printf("\nB) Set RX Low Water ");
  19.     printf("\nC) Set RX High Water : ");
  20.     switch(toupper(getch()))
  21.     {
  22.         case 'A' : y=0; break;
  23.         case 'B' : y=1; break;
  24.         case 'C' : y=2; break;
  25.         default : goto Choose;
  26.     }
  27.  
  28.     printf("\nEnter New water mark : ");
  29.     scanf("%x",&water); while(kbhit()) getch();
  30.  
  31.     regs.h.ah = 0x1c;
  32.     regs.h.al = (unsigned char)y;
  33.     regs.x.bx = water;
  34.     regs.x.dx = dx;
  35.  
  36.     printf("\nCall   - AH : %02X   AL : %02X   BX : %04X",regs.h.ah,
  37.             regs.h.al,regs.x.bx);
  38.     int86(0x14,®s,®s);
  39.     printf("\nReturn - AH : %02X",regs.h.ah);
  40.  
  41. }