Tandy 1000 Programmer's Reference Manual page 116

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 1
I System Calls
Move a File Pointer
Function Call 42H
Moves the readlwrite pointer a specified number of bytes accord-
ing t o the following methods:
0
-
The pointer is moved to the specified offset from
1
-
The pointer is moved to the current location plus
2
-
The pointer is moved to the end of file plus the
the beginning of the file.
the offset.
offset.
Entry Conditions:
AH
=
42H
CX:DX
=
distance to move the pointer, offset in bytes (CX
contains the most significant part)
AL
=
method of moving (0,
1 ,
or 2; see above)
BX
=
file handle
Exit Conditions:
Carry set:
Carry not set:
Error Returns:
AX
=
6
AX
=
error code
DX:AX
=
new
file pointer position
Invalid handle. The handle passed in BX is not cur-
rently open.
Invalid function. The function passed in AL was not
in the range 0-2.
AX
=
1
Example:
LSeek
eq"
4 2 H
mov
d x , o f f s e t l o w
mov
c x , o f f s e t h i g h
mov
a1
, m e t h o d
m Q V
b x , h a n d l e
m Q v
a h , L S e e k
I n t
21 H
114

Advertisement

Table of Contents
loading

Table of Contents