1410 OPEN 1,8,2,
"0:"
+
FI$+"
,L,"
+ CHR$(RL)
1420 GOSUB 59990
1430
RH
= INT(NRl256)
1440
RL=NR-256*RH
1450
PRINT#15,
"P"
+ CHR$(96 +
2)
+
CHR$(RL) + CHR$(RH)
1455
PRINT#
15,
"P"
+ CHR$(96 +
2)
+
CHR$(RL) + CHR$(RH)
1460 GOSUB 59990
1470 PRINT#1 ,CHR$(255);
1480 GOSUB 59990
1500 GOSUB 59990
1510 CLOSE 1
1520 GOSUB 59990
9980 CLOSE
15
9990 END
59980 REM CHECK DISK SUBROUTINE
59990INPUT#15,EN,EM$,ET,ES
60000 IF
EN>
1 AND
EN<>50
THEN PRINT
EN ,EM$,ET ,ES:STOP
60010 RETURN
BASIC 7.0:
1380 INPUT"ENTER RELATIVE FILE NAME";FI$
1390 INPUT"ENTER MAX. # OF RECORDS
";NR
1400 INPUT"ENTER RECORD LENGTH";RL
1410 DOPEN#I,(FI$),L(RL)
1420 GOSUB 60000
1450
RECORD#I,(NR)
1455 RECORD#1 ,(NR)
1460 GOSUB 60000
1470 PRINT#I,CHR$(255);
1480 GOSUB 60000
1500 GOSUB 60000
1510 CLOSE 1
(continued)
58
Begin to create desired
file
Check for disk errors
Calculate length values
Position to last record
number
Re-position for safety
Send default character to it
Now the
file
can be safely
closed
And the command channel
closed
Before we end the pro-
gram
Error check subroutine
Ignore "RECORD NOT
PRESENT"
Select
file
parameters
Begin to create desired
file
Check for disk errors
Calculate length values
Position to last record
number
Send default character to it
Now the
file
can be safely
closed