3-25
{
regs.h.ah= 0x1C;
regs.h.al= status;
regs.h.bh= 9;
int86(0x21,&regs,&regs);
}
5F Read host port
Entry Parameters: AH = 0x5F
Returned Values: DS:DX = buffer pointer
AL = 0 ;output succeed
1 ;no data
int TC_str_I(unsigned char *str,int wait)
{
do {
regs.h.ah=0x5F;
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
int86x(0x21,&regs,&regs,&segregs);
} while (wait && regs.h.al);
return(regs.h.al);
}
60 Output data
Entry parameters: AH = 0x60
DS:DX = buffer pointer
Returned Values: AL = 0 ;output succeed
1 ;buffer busy now
int TC_str_O(unsigned char *str,int wait)
{
do {
regs.h.ah=0x60;
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
int86x(0x21,&regs,&regs,&segregs);
} while (wait && regs.h.al);
return(regs.h.al);
}
61 Check if Busy-port
Entry Parameters: AH = 0x61