I heard that Assembly Languages are depending on the CPU, and the fact that a .exe file can mostly all Windows machine. Makes me wonder how does that work?
Does that imply that there are only a few Assembly languages?
or Does the Windows System do some sort of translation to fit different type of CPUs?
The simple answer:
They cannot be executed on "different CPUs".
The more complex answer:
Most computers running Windows use only two different types of CPUs: x86 or x86-64.
Then there are so called ".NET" executables. Such executables do not contain any machine code but they contain special byte code (similar to Java programs).
When you run the program the first time on a certain computer Windows will translate that byte code into machine code suitable for the computer you run the program on. If you run the program on an ARM computer the byte code will be translated into an ARM program.
The computer will actually execute the "translation", not the original ".NET" executable.
Because the "translation" is done for a specific computer there is no need to be executable on different CPUs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With