2 ms·
>I thought assembly mapped 1-to-1 with actual HW instructions. Assembly encodes a wide varity of abstractions (it is a human readable format after all) and lot
by constantcrying 4y ago
>I thought assembly mapped 1-to-1 with actual HW instructions.
Assembly encodes a wide varity of abstractions (it is a human readable format after all) and lots of assembly instructions have a clear relation to an instruction on the hardware, but definitely not all.
E.g. a CPU does not understand what a "label" is and the semantics of a labels and jumping to them is removed by the assembler.
But not even the assembled binary actually maps to executed instructions. The CPU is actually a virtual machine which presents itself as e.g. an x86 ISA interpreter, but internally it uses microcode executed in various performance enhancing ways to speed up the process.