PT630 Programming Reference Guide
Page 17 of 59
------------------------------------------------------------------------------------------------------------------
1.5.8 Read Keypad (wait if no key)
Entry Parameter: AH = 8
Return Value: AL = 0 – 255
; ASCII character
1.5.9 Write Character String to LCD
Entry Parameter: AH = 9
DS:DX
;
pointer
to
string
buffer
Return
Value:
None
Example:
void TS_stdout_string(unsigned char *str)
{
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
regs.h.ah= 9;
int86x(0x21,®s,®s,&segregs);
return;
}
1.5.10 Buffered Keypad Input
Entry parameter: AH = 0AH
DS:DX
;
pointer
to
data
buffer
Return value:
DS:DX
; pointer to data buffer
Data format in buffer:
Input buffer with CR at last
number of characters actual input
number of characters requested to be input
n
m
Example:
void TS_stdin_string(unsigned char *str)
{
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
regs.h.ah= 0x0a;
int86x(0x21,®s,®s,&segregs);
return;
}
1.5.11 Check Keypad Status
Entry Parameter: AH = 0BH
Returned Value:
AL = 0
; no keys were pressed
0FFH
; key was pressed and input character is Ready
Example:
unsigned char TS_kbhit()
{
regs.h.ah= 0x0b;
int86(0x21,®s,®s);
return(regs.h.al);
}