PT630 Programming Reference Guide
Page 48 of 59
------------------------------------------------------------------------------------------------------------------
1.5.36 Receive Data from RS232 Port in MULTIPOINT Protocol
Entry Parameter: AH = 5CH
DS:DX
; pointer to data buffer (max. 256 bytes)
Returned Value: AL =
0 ; input successful
1 ; no data
DS:DX =
input buffer pointer
Note:
1) Only for MULTIPOINT communication protocol
2) Data is sent by Host computer using ESC ‘0’ command
Example
:
int TC_str_I(unsigned char *str,int wait)
{
do {
regs.h.ah=0x5C
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
int86x(0x21,®s,®s,&segregs);
} while (wait && regs.h.al);
return(regs.h.al);
}
1.5.37 Send Data to RS232 Port in MULTIPOINT Protocol (Buffered Output)
Entry Parameter: AH = 5DH
DS:DX ; pointer to buffer with output data (max. 256 bytes)
Return
Value:
AL
=0
;
successful
1
; failed (output buffer already has data to be sent)
Note:
1) Only for MULTIPOINT communication protocol
2) PT630 will send data out when polled by Host computer
Example
:
int TC_str_O(unsigned char *str,int wait)
{
do {
segregs.ds = FP_SEG(str);
regs.x.dx = FP_OFF(str);
regs.h.ah=0x5D;
int86x(0x21,®s,®s,&segregs);
return(regs.h.al);
} while (wait && regs.h.al);
return(regs.h.al);
}