BX = Handle of file
CX = most significant half of 32 bits offset
DX = least significant half of 32 bits offset
Return Value: if success, CARRY flag is cleared
AX = least significant half of new current position
DX = most significant half of new current position
if failed, CARRY flag is set
AX = 6
Example
:
long TS_seek_file(int hdl,int type,long loc)
{
union LONG_III aa;
regs.h.ah=0x42;
regs.h.al=(unsigned char)type;
regs.x.bx=hdl;
aa.l.ll = loc;
regs.x.cx=aa.i.ii2;
regs.x.dx=aa.i.ii1;
int86(0x21,®s,®s);
aa.i.ii2=regs.x.dx;
aa.i.ii1=regs.x.ax;
if ((regs.x.cflag & 0x01) == 0) return(aa.l.ll);
else return(-1L);
}
42.
Search Character Beginning at the Current File Position
Entry Parameter:
AH = 42H
AL = 3
; search forward (to the end of file)
4
; search backward (to the beginning of file)
BX = file handle
CX = n
; search nth matched character
DL = character
Return Value: 1) If character is found:
Carry flag = clear
DX:AX = pointer to current file position (at the position
of
matched character)
2) If character is not found:
Carry flag = set
Summary of Contents for PT600
Page 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...
Page 7: ......
Page 16: ......
Page 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...
Page 57: ......
Page 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...