easy question about machine code

This is a discussion on easy question about machine code within the Tech Board forums, part of the Community Boards category; Yes, I know that exe file (from Windows) can not execute on linux, and vice versa.
I doubt that machine ...

easy question about machine code

Yes, I know that exe file (from Windows) can not execute on linux, and vice versa.
I doubt that machine code is `machine' dependent (not OS dependent).
I question why it is not portable although running on same CPU, same architecture and same registers but different OS?
Or may be different address located?
Please make me out.
Thanks,

My experience is that its 99.999% of binarys are portable. Linux can run windows software through emulation, Windows can run linux binarys through emulation (There are several ways, cygwin is a util that might help) and best of all, FreeBSD can run both Linux and Winblows binarys. Whats really sad is that FreeBSD's linux binary emulation is so good, that most the time it can auctually run a linux binary emulated FASTER than it can be run by a linux box natively! Now THATS speed and power. There are a million different types of executable formats, however they arent that low of a level. 99% of the time u dont want to talk to the CPU at uuber low level, you want to talk to the OS and draw pictures or characters. Besides, CPUs are way more complicated these days. Way back when, a cpu had what? a dozen instructions? something like that? Now the P4 for example has something like 450+. Thats a big gap. Thats why compilers can optomize code way better than humans can, and since the only people that know all of the P4 instructions are dark creatures living deep within the depths of intels R&D division, nobody sits down and starts hashing out ultra low level ASM. The WinASM stuff i have seen is auctually like a language. Not much like old ASM on big blue's mainframes =P

>>There are a million different types of executable formats, however they arent that low of a level. 99% of the time u dont want to talk to the CPU at uuber low level, you want to talk to the OS and draw pictures or characters.