PT630 Programming Reference Guide
Page 16 of 59
------------------------------------------------------------------------------------------------------------------
1.5.5 Write
RS232
Entry Parameter: AH = 4
DL
=
0
–
255
;
ASCII
character
Return
Value:
None
Note:
Only for NONE communication protocol
Example:
void TS_stdaux_out(unsigned char ch)
{
regs.h.ah= 4;
regs.h.dl= ch;
int86(0x21,®s,®s);
return;
}
1.5.6 Direct Console I/O
Entry Parameter: AH = 6
DL =
0 – 254 ; write ASCII character in DL to LCD
255
;
read
ASCII
character
from
keypad
Return Value: 1) When read (DL <> 255):
Character in AL if ZERO flag is cleared
No input if ZERO flag is set
2)
When
write
(DL=
255):
None
Example:
unsigned char TS_stdin_out(unsigned char ch)
{
regs.h.ah= 6;
regs.h.dl= ch;
int86(0x21,®s,®s);
if (ch == 0xFF)
{
if ((regs.x.cflag & 0x40) == 0) return(regs.h.al);
else return(0);
}
return(0);
}
1.5.7 Read Keypad (wait if no key)
Entry Parameter: AH = 7
Return Value:
AL = 0 – 255
; ASCII character
Example:
unsigned char TS_stdin_noecho()
{
regs.h.ah= 7;
int86(0x21,®s,®s);
return(regs.h.al);
}