
5B
Create New File
Entry Parameter:
AH = 5BH
DS:DX
; pointer to file name string
Return Value: if success, CARRY flag is cleared
AX = file Handle
if failed,
CARRY flay is set
AX = 04H ; too many open files
50H ; file exists
Note:
If the specified file already exists, the function fails.
Example
:
int TS_create_new_file(char *fn)
{
regs.h.ah=0x5B;
segregs.ds = FP_SEG(fn);
regs.x.dx = FP_OFF(fn);
if ((regs.x.cflag & 0x01) == 1) return(-1);
else return(regs.x.ax);
}
5C
Receive Data from RS232 Port in MULTIPOINT Protocol ---for Host
Port Control
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);
}
Содержание PT600
Страница 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...
Страница 7: ......
Страница 16: ......
Страница 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...
Страница 57: ......
Страница 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...