"If you write an assembly program for Linux, it won't run on DOS or Windows.
That's plain wrong.
No, it's not wrong. (Please re-read what I wrote, and then read what you wrote. We're talking about two different things. You totally I mean TOTALLY misunderstood my statement! And you're responding to a statement that I never meant to write.)
DOS programs call INT 21h. In Windows programs, there's the Windows API, and Linux has its own service libraries. The way the EXE headers are written in Windows is totally incompatible with Linux headers. And if you try to execute a Linux program in DOS or vice versa, it won't even load, because the OS does not recognize it as a valid executable. You know what I am talking about, so don't pretend that this isn't true. | [reply] |
You seem to be confusing an "executable" with "assembly", probably because they both deal with machine code.
The way how the result of an assembler is bound to needed libraries to create an OS specific executable is irrelevant.
Anything else compiling to machine like C or Pascal needs this step too.
I can even include the same ASM code inside Perl code via Inline::ASM and start it under different OS, as long as it's the same CPU.
> Please re-read what I wrote,
I did.
| [reply] |