3 ms·
> I thought assembly mapped 1-to-1 with actual HW instructions. on x86 it's a 1-to-many relationship. There are, for example, many different MOV instructions t
by deckard1 4y ago
> I thought assembly mapped 1-to-1 with actual HW instructions.
on x86 it's a 1-to-many relationship. There are, for example, many different MOV instructions that can be encoded based on the parameters used. All assemblers I know of hide this from the user, as well as featuring labels, macros, etc. which are not defined by the hardware at all. For the most part, the x86 assembler hides the details of prefix bytes and ModR/M+SIB from the user. Some assemblers are quite advanced and if you took them just a few logical steps beyond where they are you would end up with C.