Turbo Pascal chain file

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name Turbo Pascal chain file
Ontology
Extension(s) .chn

A Turbo Pascal chain file (CHN file) was used in early versions of Turbo Pascal (through 3.x) for PC/MS-DOS or CP/M (released in the 1980s) to compile programs into smaller file sizes by omitting the runtime routines needed to execute them as standalone programs. Chain files could be launched from another Turbo Pascal program using the chain standard procedure. This allowed the creation of program systems larger than would fit in one compiled program, which, in those early versions, used the .com file format which was limited to 64K. A program could be modularized to a set of chain files and a single runnable program as the entry point, and the other parts would save disk space and loading time by not repeating the runtime modules already in memory.

Later Turbo Pascal and Borland Pascal versions switched to using EXE files without the size limit, so it was no longer considered necessary to provide the ability to create chain files. Modularization at that point was done through compiling Turbo Pascal Unit (TPU) files and then linking them into a single executable.

Early Turbo Pascal compilers had a certain elegance that came of their need to work in systems with tiny amounts of memory and disk space; they packed a complete compiler and editor in less space than decorative graphics often take up in modern systems.

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox