The BASIC program interfaces I've used typically give a similar example of a command to read all bytes in a file.
DO / UNTIL EOF (or equivalent WHILE/ WEND loop).
At some time I started to find 'EOF' did not always bring about the expected end of a file input loop. I forget if it produced an error, or maybe it simply froze program execution.
Anyway I stopped using 'EOF'. I find it works if I get a byte count of the file length as I open it, and then keep track continually of how many bytes I have read.
Or to read the entire file into memory, and then PEEK each byte in sequence.