lovingboth: (Default)
Ian ([personal profile] lovingboth) wrote2005-12-20 11:41 pm
Entry tags:

Legacies

I needed to write a quick program to extract some data from a binary file today, so I reached for Borland Pascal 7. The actual program took a couple of minutes to get right... most of it because of a 'feature': if you open a file in binary (as opposed to text) mode, you have to say how many bytes you will read at a time.

If you forget - as I do every so often - it defaults to... 128 bytes.

Why 128 bytes rather than one?

Because that was the size of a sector on the original 8" floppy disk, which had 77 tracks of 26 sectors back in the early 1970s. Early versions of CP/M could only read and write in 128 byte chunks, and Turbo Pascal was originally released for CP/M, so that was the sensible value for the default.

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org