logoalt Hacker News

tsimionesculast Wednesday at 1:50 PM3 repliesview on HN

Sure, but learning an old ISA can leave you with a very very wrong idea about how modern processors work. Even x86 assembly paints a very misleading image of how modern processors actually work. For example, someone learning x86-64 assembly will likely believe all of the following:

- assembly instructions are executed in the order they appear in in the source code

- an x86 processor only has a handful of registers

- writing to a register is an instruction like any other and will take roughly the same time

- the largest registers on an x86 processor are 64-bit


Replies

ThrowawayR2last Wednesday at 3:09 PM

All of which are completely irrelevant implementation details hidden behind the ISA. The x86-64 ISA promises execution of instructions in the specified order, a certain number of registers, etc. and that's all they need to know.

show 2 replies
t-3last Wednesday at 2:53 PM

They will be disabused of any of those notions simply by reading the relevant portions of the architecture handbook. In a pedagogical environment that's very simple to arrange.

show 1 reply
flohofwoelast Wednesday at 3:01 PM

Peeking under the hood is a later step after getting comfortable with assembly coding. E.g. none of those details are really relevant when starting out, instead it makes a lot of sense to do a speed run through computing history in order to really understand why modern CPUs (and computers as a whole) work like they do.