hn.today

EAX x86 Register Meaning and History

keleshev.com13 points1 comments
Screenshot of EAX x86 Register Meaning and History

The names of x86’s main registers preserve decisions made across several generations of Intel processors. The 8008, introduced in 1972, had an A accumulator for arithmetic and logic, plus registers H and L that could form a memory address; B, C, D and E were more general-purpose. Its instruction encoding allowed eight register choices, with the remaining option used for M, a memory reference through H and L. The 8086 carried forward much of this design to support compatibility with earlier processors. It paired high and low bytes AH and AL within the 16-bit AX register, while giving other registers specialized roles reflected in names such as BX (base), CX (count) and DX (data).

When the 80386 expanded the main registers to 32 bits, it added E for “extended,” producing EAX; AX and its byte parts remained accessible within it. The 64-bit x86 generation introduced by AMD used R instead, yielding RAX and related names, alongside new registers R8-R15. Here R was chosen to mean “register” and make the naming more consistent with those additions. The meaning of X in AX is less definitive: 8086 architect Stephen Morse recalled that it was an arbitrary letter for the full 16-bit register, distinguishing it from byte halves AH and AL and from pointer, index and segment registers. Thus, EAX’s name reflects a straightforward extension of AX, while AX itself does not have a firmly established expansion for X.

Read on keleshev.com1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.