3 ms·
The RISC "core" of the ARM instruction set is both simple enough to learn (sixteen registers of which the last two are special, almost all instructions work equ
by pjc50 11y ago
The RISC "core" of the ARM instruction set is both simple enough to learn (sixteen registers of which the last two are special, almost all instructions work equally on all registers) and works unmodified across a range of systems. It's a popular choice in "intro to assembly" courses for this reason.
By comparison, x86-32 has more baggage from x86-16 and is less orthogonal. It also suffers from nonstandardisation of the vector instructions like ARM does, although you can reasonably assume FPU and MMX these days.
AMD64 might be an interesting choice to start with these days.
- exDM69 11y agoWell I agree that the ARM instruction set is more elegant, but I don't see it as a big enough improvement to warrant the extra hassle of getting set up. It's too easy for the student to get confused with all the tools and spend less time on the actual matter at hand. When learning assembly, what matters is getting used to instructions, registers, control flow and explicit memory accesses rather than statements, expressions, functions and variables. It really doesn't matter which ISA you're learning, the actual skill you learn is how to read the documentation of a CPU architecture and tools to write and debug assembly code. > It also suffers from nonstandardisation of the vector instructions like ARM does, although you can reasonably assume FPU and MMX these days. This is not correct. ARM has at least 7 different FPU ISAs: 5 versions of VFP and 2 versions of NEON. I have devices at hand with three different float units (all consumer devices). In x86 world you can rely on SSE2 safely, it's been around since Pentium 4 (1999) and is required on all 64 bit architectures (by contrast, NEON is rather new). But this is kind of a moot point since introductory assembly courses don't go too deep on floating point units anyway. Additionally, in the ARM world, there's several revisions of the ISA/architecture being used, ARMv7 (32bit) and ARMv8 (64bit) and a dozen different variants for embedded products. And two different instruction encodings (thumb). It's not at all less confusing. > AMD64 might be an interesting choice to start with these days. For basic user space programming it probably doesn't make a difference but for bare metal/kernel programming, the AMD64 architecture is more, not less, confusing than the x86_32. But in my opinion, it really doesn't matter what you learn first. The details of the ISA itself is of secondary importance, understanding how to read the documentation of the architecture and getting some hands on experience is way more important.
- pjc50 11y agoI meant "you can assume an x86 system will have a floating point unit and MMX", and you've explained that SSE2 is also a reasonable assumption.
- deleted 11y ago[deleted]