Returned Values: | AL = 0 | ;port is available |
| 1 | ;port is busy |
int TC_ready(int wait)
{
int i; do {
regs.h.ah=0x61;
int86(0x21,®s,®s);
}while (wait && regs.h.al); return(regs.h.al);
}
3.4.Serial I/O for RS-232 and RS-485
The system allow to the
The INT 34H is dedicated for
RS-232 port serial I/O using INT 34H
01 | Input data |
|
| Entry Parameters: | AH = 1 |
| Returned Values: | 1) if a character received |
AH = 0
AL = Data character
2) if no character received AH = 1
AL = undefined
unsigned char TC_232_char_I()
{
regs.h.ah = 1; int86(0x34,®s,®s); if (regs.h.ah == 0)
return(regs.h.al);
return(255);
}