PART TWO: GUIDE
TO
ADVANCED OPERATION
AND
PROGRAMMING
31
CHAPTER 4: SEQUENTIAL DATA FILES
...............................
31
The concept
of
files
............................................
31
Opening a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
32
Adding to a sequential
file
..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
34
Writing
file
data:
Print
#
.......................................
35
Closing a
file
when you
are
done using it . . . . . . . . . . . . . . . . . . . . . . . .
..
37
Reading
file
data:
Input
#
......................................
38
More about
Input
# (advanced users)
............................
39
Numeric data storage on diskettes
................................
40
Reading
file
data: Get #
........................................
41
CHAPTER 5: RELATIVE FILES
................•......................
44
The value ofrelative access
.....................................
44
Files, records, and fields
........................................
44
File limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
45
Creating a relative file
..........................................
45
Using relative files: Record # command
...........................
46
Completing relative file creation
.................................
48
Expanding a relative file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
49
Writing relative
file
data
........................................
50
Designing a relative record. . . . . . . . . . . . . . . . •. . . . . . . . . . . . . . . . . . .
..
50
Writing the record
....................•........................
51
Reading a relative
record.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
53
The value of index
files
(advanced users)
..........................
54
CHAPTER 6: DIRECT ACCESS COMMANDS
...........................
55
A tool for advanced
users.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
55
Diskette organization
..........................................
55
Opening a
data
channel for direct access . . . . •. . . . . . . . . . . . . . . . . . .
..
55
Block-read
...................................................
56
Block-write. . . . . . . . •. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
57
The original Block-read
and
Block-write commands . . . . . . . . . . . . . .
..
58
The buffer pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
59
Allocating blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
60
Freeing blocks
....••..........................................
61
Using random files (advanced users)
..............................
62
CHAPTER
7:
INTERNAL DISK COMMANDS
.......•.........•..........
63
1551 memory
map
.............•...............................
63
Memory-read
.................................................
64
Memory-write
..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..
65
Memory-execute
.........................................•....
66
Block-execute
...•.........•................•..................
67
User commands
.••....................•.......................
68