home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCT6_0.C < prev    next >
C/C++ Source or Header  |  1993-03-29  |  619b  |  31 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    far *cptr;
  12.  
  13. union REGS regs;
  14.  
  15.     printf("\nEnter DX : ");
  16.     scanf("%d",&dx); while(kbhit()) getch();
  17.  
  18.     sregs.r_ax = 0x0600;
  19.     sregs.r_dx = dx;
  20.     printf("Call   - AH : %02X  AL : %02X",(sregs.r_ax&0xff00)>>8,
  21.                                          (sregs.r_ax&0xff));
  22.     intr(0x14,&sregs);
  23.     printf("\nReturn - AH : %02X  AL : %02X  ES:BX - %04X:%04X",
  24.           (sregs.r_ax&0xff00)>>8, (sregs.r_ax&0xff),sregs.r_es,sregs.r_bx);
  25.     printf("\nName : ");
  26.     cptr = MK_FP(sregs.r_es,sregs.r_bx);
  27.     for(x=0;x<8;x++)
  28.         printf("%c",*cptr++);
  29.  
  30.  
  31. }