If you were unable to access the Record Length byte in the directory entry for a Relative File, is there another way to pull a Relative File's record length?
I found kind of a brute force way of doing this by opening the REL file in a loop and reading the error channel to determine if the record length was accepted. See code below. This method is obviously slow. Maybe there is an easier way?
I brought this up because of the current limitation of the uIEC 0.8.2 firmware and it's inability to read a directory's on-disk format with a non-zero secondary address. The on-disk format directory read returns a REL file's record length in byte 21 of the file entry as opposed to a directory read using a secondary address of zero which doesn't. I also want a solution that will work on the uIEC as well as other C= compatible drives.
10 d=8:l=0:input"enter filename: ";f$:print
20 open15,d,15:iff$=""then70
30 l=l+1:open2,d,2,f$+",l,"+chr$(l)
40 input#15,a,b$,b,c:close2:ifa=.then80
50 ifa=50then30
60 print:printa;b$;b;c
70 close15:end
80 close15:print"record length= "l