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

LONG MODE x86-64’s mode bit — the permutation reaches 64

In 2003 AMD did to the 386 what the 386 did to the 8086: a mode bit — LMA, long-mode active — that widens the machine to 64-bit registers, with a compatibility sub-mode that still runs 32-bit code. This is x86-64 (AMD64), the architecture almost every desktop and server runs today. The permutation the 65816 started — a wider machine behind a mode bit — here reaches its fourth doubling, 8→16→32→64, though only 48 of the 64 address bits are actually used (dart 479). Real→protected→long: three mode switches, one lineage.

THE TECHNIQUE LMA=1 ⇒ 64-bit registers, 48-bit canonical addressing (over 32-bit)

The demo shows the address width unlocked by long mode — 32-bit in protected mode, 48-bit canonical in long mode: live demo


HISTORY & CREDIT AMD64 / x86-64 · 2003

“64-bit meant starting over.” — long mode is one more mode bit, 32-bit code still running underneath. cited

the bit · LMA (long-mode active) — 64-bit registers; a compatibility sub-mode runs 32-bit code.
the ladder · real → protected → long — three mode switches, the fourth doubling.
2003 · AMD (AMD64) — x86-64, what nearly every machine runs today.

The same mode-bit move, one more time, all the way to sixty-four — the permutation at the top of the ladder. mode bit

RECOMMEND FOR I-13 the widened address, on the compiler

On the canonical compiler, long mode takes the address width from 32 to 48 (canonical) bits:

$ i13 run ln_longmode.i13 # LMA selects address width RUN OK · 30 step(s) · peak stack 3 · call depth 1 prot_bits = 32 -- protected mode long_bits = 48 -- long mode (48-bit canonical of 64) widened = 1
Recommend as a NULL — the mode-bit pattern, at 64. Long mode is another width-selecting mode bit (B44/B39) buying more range (B40); it duplicates the mode-bit move (dart 484), now at the top of the ladder. NULL — the answer to “did it permutate past the SNES?”: the pattern did, all the way to 64-bit, in x86.