home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCTFC.C < prev    next >
C/C++ Source or Header  |  1993-03-30  |  546b  |  33 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.  
  13. union REGS regs;
  14. /*struct SREGS sregs;*/
  15.  
  16.  
  17.  
  18.     printf("\nEnter DX : ");
  19.     scanf("%d",&dx); while(kbhit()) getch();
  20.  
  21.     printf("\nEnter # bytes : ");
  22.     scanf("%x",&numbytes); while(kbhit()) getch();
  23.  
  24.     for(x=0; x<numbytes; x++)
  25.     {
  26.         regs.h.ah = 0xfc;
  27.         regs.x.dx = dx;
  28.         printf("\nCall   - AH : %02X",regs.h.ah);
  29.         int86(0x14,®s,®s);
  30.         printf("   Return - AL : %02X = %c  AH : %2X  ",regs.h.al,regs.h.al,regs.h.ah);
  31.     }
  32.  
  33. }