Its reading the file
As you know from this
open "g:\data\junk.txt" for output as #1
print#1, a$
close #1
like open for OUTPUT and PRINT #
similarly this...
open "g:\data\junk.txt" for input as #1
while not(eof(#1))
input #1, b$
k=k+1
wend
is reading the file back IN byte by byte.