A File Control Block (FCB) is a file system structure in which the state of an open file is maintained. An FCB is managed by the operating sytem, but it resides in the memory of the program that uses the file, not in operating system memory. This allows a program to have as many files open at one time as it wants to, provided it can spare enough memory for an FCB per file.
The FCB originates from CP/M and is also present in most variants of DOS, though only as a backwards compatibility measure in MS-DOS versions 2.0 and later. A full FCB is 36 bytes long; in early versions of CP/M, it was 33 bytes. This fixed size, which could not be increased without breaking application compatibility, lead to the FCB's eventual demise as the standard method of accessing files.
The meanings of several of the fields in the FCB differ between CP/M and MS-DOS, and also depending on what operation is being performed. The following fields have consistent meanings:
| Offset | Byte size |
Contents |
|---|---|---|
| 00 | 1 | Drive number — 0 for default, 1 for A:, 2 for B:,... |
| 01 | 8 | File name and file type — together these form a 8.3 file name |
| 09 | 3 | |
| 0C | 20 | Implementation dependent — should be initialised to zero before the FCB is opened. |
| 20 | 1 | Record number in the current section of the file — used when performing sequential access. |
| 21 | 3 | Record number to use when performing random access. |
Read more about File Control Block: Usage
Famous quotes containing the words file, control and/or block:
“A common and natural result of an undue respect for law is, that you may see a file of soldiers, colonel, captain, corporal, privates, powder-monkeys, and all, marching in admirable order over hill and dale to the wars, against their wills, ay, against their common sense and consciences, which makes it very steep marching indeed, and produces a palpitation of the heart.”
—Henry David Thoreau (18171862)
“Just as men must give up economic control when their wives share the responsibility for the familys financial well-being, women must give up exclusive parental control when their husbands assume more responsibility for child care.”
—Augustus Y. Napier (20th century)
“For Jews demand signs and Greeks desire wisdom, but we proclaim Christ crucified, a stumbling block to Jews and foolishness to Gentiles...”
—Bible: New Testament, 1 Corinthians 1:22-3.