EasyManua.ls Logo

Tandy TRS-80 - Page 57

Tandy TRS-80
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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'
"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 11
1
1
BIIBilllllillllieiiiilll
iiiiiiliiiiiiii
i i a i i
i i i
i
Bisiiiiaiiiiiiinigiim
iiniaagiiiBBaBBiaeiiiii

Related product manuals