The relation btw PE(Portable Executable) file and platform ?

Started by KyungPyo, July 24, 2006, 05:37:25 AM

Previous topic - Next topic

KyungPyo

It's a basic question about pe file and windows.

I have read that any pe files ( such as .exe file) can be excuted in any platform if Windows runs on its platform.

Now, I doubt it. So if u know about it, could u let me know if or not this is ture.

For example, if I try to excute excutable file( .exe) (which runs Windows on x86 based PF)  in DEC-ALPHA Platform,  can it be excuted ?

I have naver thought  that it can be excuted because each platform has it own asem language.

Today, I inspected text area (code area) in  an Exe file. I sought that ASEM codes are written based on x86 platform.

If it can be excuted, please explain it to me.... ^^;

Thanks for your help. Have a good day ~~

hutch--

KyungPyo,

A file format is determined by the specifications of the OS it was designed to run on and the physical hardware that the computer is built with. What is usually done for code that must run on different hardware that uses a common OS is that the file is built for each platform using a compiler that is designed to build code for that platform.

In most instances this means the application must be written in a portable language like C/C++ or JAVA.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

KyungPyo

Thanks Hutch!

As u explained, execution of .exe file in Window OS  is highly dependent on phsycal platform (such as x86 and alpha etc..).

As a result, executabe file which operates in x86 based system  should be re-built to run in Dec-alpha based system, even if both systems use same windows os(WINDOWS 2K) . Right?

Thanks ~~

Tedd

Yes.
An exe built for x86 contains x86 instructions, which only an x86 cpu can understand. The DEC cpu only understands DEC instrctions, so it will not understand an x86 exe.
(And the same for DEC instrctuins on x86 cpu.)

So the code would need to be re-compiled for each machine separately, even if the OS is the 'same.'
No snowflake in an avalanche feels responsible.

dsouza123

As far as Windows NT on a DEC Alpha CPU running x86 executables lookup FX!32

James Ladd

There is also a technology availabel on some platforms to see that an exe is not for that platform but
run it anyways. I think the DEV Alpha had this facility. Of course the programs are no longer running
natively but interpreted on an in-built virtual machine.