On a VIC-20 or C-64, you could open a sequential file on a 1541, write exactly N bytes (say, 47 bytes) to it, then close it. Then you could open the same file for reading and start reading byte by byte (with
GET#, for instance). After reading the 47th byte, you would get a special status (reserved variable
ST = 64 in BASIC) to tell you the end of file had been reached.
But by my recollection (and this site), the 1541 directory entry only contained a number of blocks, and the only metadata in each block was a track/sector pointer to the next block of the file. I don't see a precise byte count anywhere. And, as far as I know, all byte values (00 through FF) were allowed as content in the file, so no code could be used as an end-of-file marker either. So how did DOS "know" that it had reached the end of file at byte 47? Was there a hardware-level marker in the last sector, or an extra byte in the inter-sector space that wasn't "visible" by applications?