home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCT3.C < prev    next >
C/C++ Source or Header  |  1993-03-29  |  493b  |  35 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.  
  12. union REGS regs;
  13. /*struct SREGS sregs;*/
  14.  
  15. /* special char - <CR> */
  16.  
  17.  
  18. printf("\nEnter DX : ");
  19. scanf("%d",&dx); while(kbhit()) getch();
  20.  
  21. printf("Press ESC to Quit, Press any key for more status\n");
  22.  
  23.  
  24. while(1)
  25. {
  26.     regs.h.ah = 0x03;
  27.     regs.x.dx = dx;
  28.     int86(0x14,®s,®s);
  29.     printf("AH : %02X   AL : %02X   ",regs.h.ah,regs.h.al);
  30.  
  31.     if(getch() == 0x1b) break;
  32.  
  33. }
  34.  
  35. }