logoalt Hacker News

mjg59yesterday at 5:53 PM2 repliesview on HN

808x registers are all 16 bit, despite it having a 20 bit address space. That means you can't fit a full memory address in a single register, which means memory is split into 64K "segments" and you have a separate segment register that tells the CPU which segment you're referring to (segments can overlap, so this is distinct from banked memory). On its own that makes writing 808x code fucking miserable.


Replies

bcrltoday at 12:46 AM

Any programming in real mode with compilers meant that the programmer had to annotate pointers with near, far and huge. Plus you had to know if the stack segment was the same as the data segment...... ARRRRGGGGHHH.

I am glad that time is in the distant past now, although apparently plenty of brain cells remain dedicated to the 8088.

stmwyesterday at 9:17 PM

Indeed, this aspect of early x86 is something more people need to know about... It still has its remnants in low-level code. Of course, 6502 and other 8-bit processors had similar issues tryign to go beyond the 64K addressing limit, but only the x86 line both baked this into the architecture and continued to carry it forward for compatibility for many years.