+ 4
How do apps made in different languages work? Do operating systems know all languages?
5 ответов
+ 2
Means os can only understand know exe files?
+ 1
I'm a bit vague about the details, but a .exe is an executable a .com is a ....wait, I don't know, I'm gunna Google it.
https://devblogs.microsoft.com/oldnewthing/20080324-00/?p=23033
"But wait, what if a COM program just happened to begin with the letters MZ? Fortunately, that never happened, because the machine code for “MZ” disassembles as follows:
0100 4D DEC BP
0101 5A POP DX
The first instruction decrements a register whose initial value is undefined, and the second instruction underflows the stack. No sane program would begin with two undefined operations."
+ 1
TLDR: .com was copied straight in to memory and "given the reins" (allowed to start immediately)
A .exe had a header and some checks before being allowed to execute.