Tandy 600 Programmer's Reference Manual page 59

Bios programmers
Hide thumbs Also See for 600:
Table of Contents

Advertisement

An
application
program
may
directly
access
the data contained
in
a
file
by
placing
the value
returned
in
AX
into
a
segment
register
and
then performing normal
memory
fetch/store
operations
relative to that
segment. Extreme
caution
must be
taken
when
accessing a
file in
this
manner, as
it
is
possible
to affect
memory
locations
beyond
the
end
of
the
given
file,
and
thus destroy the
integrity
of
the
file
system.
The
current size
of
the
file
will
be
returned
in
DX
when
function
D2h
is
performed. At other
times,
use
function
D3h
to
determine
the current
size
of
the
file
and be
careful
not
to
go beyond
that
limit in
making accesses
to
the
file.
Furthermore, the
segment
address
returned
indicates the location of the
file
in
memory
at
the
time
of
the
function
call.
The
file
is
not
guaranteed
to
remain
at
this
location.
As
a
part
of
normal
file
operations,
HH
O/S
will
move
files
within
memory.
Before
moving any
portion of
the
file
system,
HH
O/S
will
invoke
interrupt
45h
to indicate
what
portion
of
the
file
system
is
moving and by
how
much.
File
system
movement
will
only
occur as a
result of
a
system
call
that
aflocates
an
absolute
memory
block, or
modifies the size
of
an
internal
file.
Programs
which
refer to
absolute
file
addresses must
either
supply
a
File
System Moving hook
routine
(entered
through INT 45h)
or
user
function
D2h
to
get the current
address
of
the
file
after
any
system
call
which
may
have caused
it
to
move.
It
is
absolutely essential
that
the
program
know
the correct
address
before
any
absolute
access
to
a
file
or catastrophic
damage
can be caused
to
the
internal
file
system.
Error
Returns;
5
-
Access
denied;
The
handle
specified
is
not
opened
as
a
file,
or the
file
opened
may
not
be accessed
in
this
manner.
6
-
Invalid
handle;
The
file
handle
specified
is
not
currently
assigned.
54

Advertisement

Table of Contents
loading

Table of Contents