Legacies

Dec. 20th, 2005 11:41 pm
lovingboth: (Default)
[personal profile] lovingboth
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.

(no subject)

Date: 2005-12-21 12:38 pm (UTC)
vampwillow: (Default)
From: [personal profile] vampwillow
Actually, one could hard-format an 8" floppy (::rude alert!::) however you wanted to do (an early job of mine was writing interfaces for the beasts) but even now I still try to compact data storage into sectors ... it has become 'inbred' ...

Profile

lovingboth: (Default)
Ian

July 2025

S M T W T F S
  12345
6 789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Page Summary

Active Entries

Style Credit

Expand Cut Tags

No cut tags