+ 4

How do apps made in different languages ​​work? Do operating systems know all languages?

18th Mar 2022, 1:03 AM
Aditya Dhiman
Aditya Dhiman - avatar
5 Answers
+ 2
Means os can only understand know exe files?
18th Mar 2022, 2:35 AM
Aditya Dhiman
Aditya Dhiman - avatar
+ 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."
18th Mar 2022, 3:43 AM
HungryTradie
HungryTradie - avatar
+ 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.
18th Mar 2022, 3:45 AM
HungryTradie
HungryTradie - avatar