Tandy TRS-80 Owner Manual & Programming Manual page 57

Color computer disk system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

f
"l
9
TRIMMING THE
FAT
OUT OF
DIRECT ACCESS
(Formatting a
Direct
Access
File)
Direct access
files
often
contain
a
lot
of
empty
space.
For example, our
first
program
is
very sim-
ilar to
Program
1
from
the
last
chapter.
The
WRITE
lines
are
identical.
However,
because
it
is
direct access,
it
will
put 512 bytes
in
"OFFICE/
DAT":
PROGRAM
5
512 bytes
10
OPEN
"D"
20
WRITE
#1
t
30 PUT
«1
,
1
40
WRITE
«1
,
50 PUT
*1
i
2
60
CLOSE
«1
•It "OFFICE/DAT'
5» "PEN"
-16» "PAPER"
A
direct
access
program
puts
your data
inside
rec-
ords.
Each
record
is
256
bytes.
Program
5 puts
two
records
in
the
"OFFICE/DAT"
file.
Therefore,
it
will
consume
2 x 256, or
512
bytes:
V
IfiliiiiililiilllUiiii!
miimiiiiiiiflimim
HBiiiiiiiimmiinii
miifiiiiiHHHim
miiiiiiiiiiii
1
1 1 1 1 1 1
1
BIIBilllllillllieiiiilll
iiiiiiliiiiiiii
i i a i i
i i
i
Bisiiiiaiiiiiiinigiim
iiniaagiiiBBaBBiaeiiiii

Advertisement

Table of Contents
loading

Table of Contents