EasyManua.ls Logo

Commodore 2031 - Page 89

Commodore 2031
98 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...
Chapter
9
RANDOM 1.00
PROGRAM
LISTING
This chapter contains a complete listing of the random access program described
in chapter 6 under the heading of Random Access Example.
[Editor's Note on following program: The original was heavily crunched. I have
added spaces to make the code more reader friendly.]
1 REM 2031 RANDOMEXAMPLE
2 REM
3 REM SUBROUTINES TO MANAGE RANDOM ACCESS FILES
4 REM VARIABLES ARE SET FROM DATA OF DESCRIPTION FILE & KEY LIST FILES...
5 REM DEFINED BY USER PROGRAM
6 REM VARIABLES SHOULD REFLECT DESIRED FILE STRUCTURE
7 REM ALL FUNCTIONS ACT UPON THE VARIABLES DEFINED BELOW
10 REM
11 REM *****************************
12 REM
15 M$=CHR$(13):REM FIELD MARKER
16 SP$=” “+””:REM SPACE FOR PADDING
20 C0=2: REM DIRECT CHANNEL
21 C1=3: REM SEQUENTIAL CHANNEL
25 CC=15: REM COMMAND CHANNEL
30 D=0: REM CURRENT DRIVE #
31 T=0: REM CURRENT TRACK #
32 S=0: REM CURRENT SECTOR #
35 DD=0: REM DESCRIPTOR DRIVE #
36 RD=0: REM RANDOM DRIVE #
85

Table of Contents

Other manuals for Commodore 2031

Related product manuals