logoalt Hacker News

gdwatsontoday at 10:52 AM3 repliesview on HN

It was a clever hack for porting existing code. But it doesn’t scale at all – you’ve just described adding four registers to a register-starved architecture in order to solve the issue for one CPU generation or so.


Replies

peterfireflytoday at 11:52 AM

Segment prefixes were rarely needed and you didn't need to spend any of the precious mod/rm bits on segment registers. The GPR count was limited to 8 partly because of the 3 bits allocated to specifying them and partly because of limited die space. Segment registers only added slightly to the latter cost.

juancntoday at 2:01 PM

Yeah, but it was probably the right call at the time.

Backward compatibility was a breath of fresh air at a time were code needed constant porting and rewriting. No two machines were alike.

It's one of the reasons the PC became so popular.

rob74today at 10:56 AM

Plus all this pointer juggling would have been more or less ok (or not ok, but doable) when programming in assembly, but for a compiler it would have been a recipe for disaster...

show 1 reply