BCX Console Demonstration Program S113.bas

 DIM A$ * 5000
 
 OPEN "JUNK.BIN" FOR BINARY NEW AS FP1  ' **************************
 A$ = REPEAT$(500, CHR$(248)) & "Hello" '     Create a data file
 PUT$ FP1, A$, LEN(A$)                  '         to explore
 CLOSE FP1                              ' **************************
 
 CLS
 OPEN "JUNK.BIN" FOR INPUT AS FP1      ' **************************
 SEEK  FP1,500                         '  Now lets read it,
 GET$  FP1,A$,6                        '  starting at the end
 PRINT A$                              '  of the file then
 SEEK  FP1,0                           '  go back to the beginning
 GET$  FP1,A$,1000                     '  of the file
 PRINT
 PRINT A$                              '  and clean up after
 CLOSE FP1                             '  ourselves.
 KILL  "JUNK.BIN"                      ' **************************