Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> B, C, D, E were completely generic and interchangeable.

I was under the impression that it went

Accumulator

Base

Counter

Data

I'm not sure about the D or E registers, but I am sure I remember using B as the base address register for arrays, and using C as the counter register for loops and such because the others couldn't be used that way.

It's been a while. Am I misremembering?



Yes, in the Z80 BC was a sort of counter register (e.g. for LDIR or DJNZ instructions), which is perhaps why BC became CX. In the 8080 there wasn't much difference between BC and DE.

The interesting part is that BX maps to HL, which explains the weird order AX/CX/DX/BX in the encoding of 8086 instructions.


It's in the article. This was introduced with the 8086; in the 8008 they were still generic.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: