home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
DIGIPROG.ZIP
/
FCT0C.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-29
|
1KB
|
42 lines
#include <dos.h>
#include <stdio.h>
main()
{
struct REGPACK sregs;
int y,x,numbytes,dx;
char *parity[] = {"None","Odd","Even"};
char *stop[] = {"1","2","3","4","5","6","11","12","13","14","15","16"};
char *len[] = {"5","6","7","8"};
char *baud[] = {"110","150","300","600","1200","2400","4800","9600",
"19200","38400","57600","76800","115200","50","75",
"134","200","1800"};
union REGS regs;
printf("\nEnter DX : ");
scanf("%d",&dx); while(kbhit()) getch();
regs.h.ah = 0xc;
regs.x.dx = dx;
printf("\nCall - AH : %02X ", regs.h.ah);
int86(0x14,®s,®s);
printf("\nReturn - AH : %02X AL : %02X BH : %02X BL : %02X ", regs.h.ah,
regs.h.al, regs.h.bh,regs.h.bl);
printf(" CH : %02X CL : %02X ", regs.h.ch,regs.h.cl);
printf("\nParity : %s",parity[regs.h.bh]);
printf("\nStop Bits : %s",stop[regs.h.bl]);
printf("\nLength : %s",len[regs.h.ch]);
printf("\nBaud : %s",baud[regs.h.cl]);
printf("\nS/W Flow : %02X",regs.h.ah);
printf("\nH/W Flow : %02X",regs.h.al);
}