Halt and Catch Fire
The term "Halt and Catch Fire" (HCF), often associated with the TV show, is a rich piece of computing folklore with deeper roots in engineering humor and real-world hardware bugs. This article dives into the origins and technical realities of HCF, detailing its manifestation in early processors like the Motorola 6800. It's a perfect blend of computing history and low-level hardware arcana that Hacker News readers adore.
The Lowdown
The article explores the fascinating history behind the term "Halt and Catch Fire" (HCF), a phrase that transcends its modern association with the AMC television show to reveal a humorous yet often literal aspect of early computer engineering. Initially an inside joke among programmers for machine-code that would freeze a CPU, requiring a full reset, the "catch fire" aspect wasn't entirely far-fetched, as evidenced by the IBM System/360. This deep dive uncovers how HCF evolved from a concept into a documented hardware phenomenon, particularly within the Motorola 6800.
- HCF describes machine-code that causes a CPU to stop useful work, requiring a reset; the "catch fire" part was sometimes literal (e.g., IBM System/360's core memory overheating).
- The term also encompassed undocumented opcodes, intentional test modes resembling hangs, and actual hardware bugs like the Pentium F00F bug.
- The phrase was partly a joke based on three-letter assembly mnemonics, leading to other humorous ones like "Execute Programmer Immediately" (EPI).
- Gerry Wheeler's 1977 BYTE article documented two specific Motorola 6800 opcodes ($9D, $DD) that he coined "Halt and Catch Fire," where the chip enters a state of continuously reading memory, with its address bus acting as a 16-bit counter, unstoppable by interrupts.
- While the 6800 didn't physically catch fire, the behavior was real and known by other names like the "Drop Dead" instruction, used by engineers for debugging by providing stable signals.
- Later, Motorola engineers confirmed this "HACOF" behavior, deliberately retaining it as a "happy accident" for fast RAM scanning during product bring-up.
- Modern investigations using actual MC6800 hardware have confirmed the behavior, noting a delay before the famous address counting pattern begins.
- Similar CPU-locking issues were found in other processors, including the 6502, the Pentium F00F bug, and are still discovered in modern x86 chips via fuzzing.
This exploration highlights the intricate relationship between hardware design, engineering folklore, and the unpredictable outcomes of low-level instructions. It's a testament to the enduring appeal of understanding the foundational mechanisms of computing, reminding us that even silicon, at its core, can harbor surprising and sometimes humorous quirks.