Any generated exe can be executed or depends on the platform that was made? [closed]

2

I took some files from the DOS operating system with the .exe extension and ran them in a virtual machine and a DOSBOX emulator. Then I tested them on a physical machine. The result between both: physical machine, virtual machine and "machine" of the emulated type was the same.

They opened and ran the file

With the source codes compiled into the virtual machine VirtualBox had several files for operation. It worked in a similar way and even looked like the physical machine and also in the emulated machine. But his instructions were not the same as both. It was not the same code as the physical machine or emulated machine. It had a huge difference. However, it worked.

I saw some articles, find out about Turing and the history of its machine.

Why can not Linux run natively by calling Virtualbox or other emulated machines, .exe files, and running them? I read about Wine and I tested it. Do not play some games I want. DOSBOX has some files that do not run and others that run.

    
asked by anonymous 18.02.2018 / 01:57

1 answer

3

It depends on the platform. An executable is a set of instructions that determine what the machine should do, so if it uses instructions that a platform does not understand will not work. It's like saying that you can arrive in Japan and it will be understood. Will not. Each one with his own way.

There are even techniques to make this happen, but it's an abstraction layer and a set of tools that will make it possible, that is, it's like you having a Portuguese-Japanese translator.

    
18.02.2018 / 03:50