Original Post
I was wondering how compilation to machine code works, say from the perspective of C++ to Machine code. From my understanding, or from what Ive read, there is a direct mapping from assembly code to machine code. Where assembly code is just a more human readable representation. So would it be safe to say that the assembly Name for an instruction is in effect, similar to a MACRO.
#define EASIER_NAME_TO_REMEMBER 5E
Secondly, there seems to be quite a few different assembly languages. When do they differ?
- Per CPU vendor?
- Per CPU Iteration? ( ie, Intel 2, 3, 4 )
I assume all of the above, as each new iteration will bring new features, and each vendor will do things differently. So how does the compiler know which machine code instructions to use when it compiles an application?
When I use the assembly view in Visual Studio, what assembly language am I viewing?
Does it contains instructions specific to my CPU?
#define EASIER_NAME_TO_REMEMBER 5E
Secondly, there seems to be quite a few different assembly languages. When do they differ?
- Per CPU vendor?
- Per CPU Iteration? ( ie, Intel 2, 3, 4 )
I assume all of the above, as each new iteration will bring new features, and each vendor will do things differently. So how does the compiler know which machine code instructions to use when it compiles an application?
When I use the assembly view in Visual Studio, what assembly language am I viewing?
Does it contains instructions specific to my CPU?