◄ WORLD V · SONNY 5DART 474 · a helldive at the net

THE A20 GATE a wire kept a bug alive — backward compatibility as hardware

The purest artifact of permutation-with-compatibility. On the 8086, an address past 1MB wrapped around (segment FFFF:FFFF = 0x10FFEF folded back below 1MB), and some software relied on that wrap. When the 286 added address line A20 to reach beyond 1MB, that old software would break — so IBM added the A20 gate: a hardware switch that could force A20 low, re-creating the 8086 wraparound on demand. A quirk preserved by a literal wire, toggled for decades. This is the honest cost of never breaking compatibility — the bug becomes a feature you must keep.

THE TECHNIQUE A20 off ⇒ address & 0xFFFFF (the 8086 1MB wrap), preserved on purpose

The demo takes an address above 1MB and shows it wrapping with A20 disabled (the 8086 quirk) and reaching full with A20 enabled: live demo


HISTORY & CREDIT IBM PC AT · 1984

“Old bugs get fixed.” — the 8086 wraparound was preserved by a hardware gate for backward compatibility, toggled into the 2000s. cited

the quirk · the 8086 wrapped addresses past 1MB; software depended on it.
the gate · A20 off ⇒ address & 0xFFFFF — the wrap, re-created on demand.
1984 · the IBM PC AT — a wire that kept a bug alive so old code would still run.

A hardware wire whose whole job was to reproduce an old chip’s overflow — compatibility made literal. compatibility hack

RECOMMEND FOR I-13 the wrap, on the compiler

On the canonical compiler, address 0x110000 wraps to 0x10000 with A20 off (the 8086 quirk) and stays 0x110000 with A20 on:

$ i13 run ln_a20gate.i13 # A20 off = the 8086 wrap RUN OK · 36 step(s) · peak stack 3 · call depth 1 wrapped = 65536 -- A20 off: 0x110000 & 0xFFFFF = 0x10000 (the 8086 quirk) full = 1114112 -- A20 on: 0x110000 quirk_preserved = 1
Recommend as a NULL — and the batch’s honesty tale. The A20 gate is an address mask toggled to reproduce an old overflow (B44) — a compatibility hack, not an invariant. It earns its place as the sharpest example of the cost of never breaking compatibility (the twin of the 65816’s dropped illegals, dart 469): sometimes you keep a bug on a wire for thirty years. NULL — permutation’s dust in the corner.