home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DIGIPROG.ZIP / FCT0C.C < prev    next >
C/C++ Source or Header  |  1993-03-29  |  1KB  |  42 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    *parity[] = {"None","Odd","Even"};
  12. char    *stop[]      = {"1","2","3","4","5","6","11","12","13","14","15","16"};
  13. char    *len[]    = {"5","6","7","8"};
  14. char    *baud[]   = {"110","150","300","600","1200","2400","4800","9600",
  15.              "19200","38400","57600","76800","115200","50","75",
  16.              "134","200","1800"};
  17.  
  18. union REGS regs;
  19.  
  20. printf("\nEnter DX : ");
  21. scanf("%d",&dx); while(kbhit()) getch();
  22.  
  23.     regs.h.ah = 0xc;
  24.     regs.x.dx = dx;
  25.  
  26.     printf("\nCall   - AH : %02X ", regs.h.ah);
  27.  
  28.     int86(0x14,®s,®s);
  29.  
  30.     printf("\nReturn - AH : %02X  AL : %02X  BH : %02X  BL : %02X ", regs.h.ah,
  31.               regs.h.al, regs.h.bh,regs.h.bl);
  32.     printf(" CH : %02X  CL : %02X ", regs.h.ch,regs.h.cl);
  33.  
  34.     printf("\nParity    : %s",parity[regs.h.bh]);
  35.     printf("\nStop Bits : %s",stop[regs.h.bl]);
  36.     printf("\nLength    : %s",len[regs.h.ch]);
  37.     printf("\nBaud      : %s",baud[regs.h.cl]);
  38.  
  39.     printf("\nS/W Flow  : %02X",regs.h.ah);
  40.     printf("\nH/W Flow  : %02X",regs.h.al);
  41.  
  42. }