home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
DIGIPROG.ZIP
/
FCT5.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-29
|
977b
|
50 lines
#include <dos.h>
#include <stdio.h>
main()
{
struct REGPACK sregs;
int y,x,numbytes,dx;
union REGS regs;
regs.x.bx = 0;
printf("\nEnter DX : ");
scanf("%d",&dx); while(kbhit()) getch();
printf("\nR)ead W)rite : ");
if(toupper(getch())=='R')
regs.h.al = 0;
else
{
regs.h.al = 1;
printf("Select Settings : ");
printf("\nA) DTR : LOW RTS : LOW ");
printf("\nB) DTR : HI RTS : LOW ");
printf("\nC) DTR : LOW RTS : HI ");
printf("\nD) DTR : HI RTS : HI ");
switch(toupper(getch()))
{
case 'A' : regs.x.bx = 0x0; break;
case 'B' : regs.x.bx = 0x1; break;
case 'C' : regs.x.bx = 0x2; break;
case 'D' : regs.x.bx = 0x3; break;
}
}
regs.h.ah = 0x05;
regs.x.dx = dx;
printf("\nCall - AH : %02X AL : %02X BL: %02X",regs.h.ah,regs.h.al,regs.h.bl);
int86(0x14,®s,®s);
printf("\nReturn - AH : %02X AL : %02X BL: %02X",regs.h.ah,regs.h.al,regs.h.bl);
}