DOS Plus, CP/M 3 and some CP/M 2 clones (specifically, DOS+2.5) support exact file sizes. The following system calls support them:
Entered with DE=address of File Control Block, C=15 (0Fh)
If the byte at FCB+32 (FCB+20h) is 255 (0FFh) then on return from this function the byte will contain the Last Record Byte Count. Remember to reset this byte to zero before attempting sequential I/O.
Entered with DE=address of File Control Block, C=17 (11h)
Returns a pointer to the file's directory entry. The byte at ENTRY+13 (ENTRY+0Dh) contains the Last Record Byte Count.
Entered with C=18 (12h)
Returns a pointer to the file's directory entry. The byte at ENTRY+13 (ENTRY+0Dh) contains the Last Record Byte Count.
Entered with DE=address of File Control Block, C=30 (1Eh)
To set the Last Record Byte Count, store the required value at FCB+32 (FCB+20h), and set bit 7 of FCB+6.
From CP/M's point of view, it's just a number from 0-255 associated with the file which programs can use for any purpose whatever. The documentation defines no interpretation for it.
If we want programs to be able to share files with exact lengths, then there had better be some sort of agreement on what the numbers mean. They must satisfy:
Unfortunately, this still leaves two plausible systems: