Conditional assembly

From Computer History Wiki
Revision as of 19:26, 28 June 2025 by Jnc (talk | contribs) (Can't believe we didn't have this one either)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Conditional assembly (originally in assembly language, later called conditional compilation in other programming languages)) is a mechanism used to produce multiple versions of a program's object code from a single set of source code.

It consists of conditional statements, inserted into the source, which conditionally direct the assembler/compiler to ignore source until a matching statement further down the source directs it to resume normal processing. The operation/non-operation of the conditional control statements are controlled by expressions in the statements, using variables which are assigned values in a number of ways (e.g. in source files, on the command line, etc.)