Why do some programs compiled for x86 do not run under x64, while some do

Started by madhur_ahuja, November 29, 2010, 06:59:52 AM

Previous topic - Next topic

madhur_ahuja

Hello

I have seen that some programs which were written by me and assembled for x86 using ml.exe run fine on my Win 7 x64. I believe this is because of Wow technology.

However, there are some programs (not written by me) which don't run. They give the error that:
The version of this file is not compatible with the version of Windows you're running. Check you computer system infromation to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher

Is there any way I can modify the EXE of these programs to make it run on Win 7 x64. What is the fundamental difference in these programs which make it different from other programs which run transparently.

Thanks,
Madhur

rags

sorry, but I dont think you'll get much help here about modifying exe's that you didnt write, as per the forum rules
God made Man, but the monkey applied the glue -DEVO

madhur_ahuja

Quote from: rags on November 29, 2010, 10:32:10 AM
sorry, but I dont think you'll get much help here about modifying exe's that you didnt write, as per the forum rules

I am not asking for help. I am asking if its technically feasible or its a technology or OS limitation. Sorry if I din't make myself clear.

oex

Your best bet is to go to the website/contact the authors of the software and ask for updated versions....
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

madhur_ahuja

Quote from: oex on November 29, 2010, 10:40:03 AM
Your best bet is to go to the website/contact the authors of the software and ask for updated versions

Its not about that. Its about understanding the underlying limitation technological problem here.

I believe the intent of this forum was to learn assembly. And I don't believe my original question is deviation from that at all.

oex

Technically feasible is a very broad brush.... Many things are technically feasible but not worth doing.... If you are asking this question this is one of them.... You are trying to do something either above your expertise level or against forum rules:

http://www.masm32.com/board/index.php?topic=31.0

"no cracking and similar activities in the guise of "Reverse Engineering", no hacking techniques or related technology and no support or help with or reference to pirated software"

As I said before if you want to run a 32 on 64 and it doesnt work contact the publisher of the software
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

sinsi

That message will show up in win64 (XPPro/Vista/Win7) if the exe is a 16-bit program (real mode DOS, win16 NE or OS/2), so there is no way of patching it to work - the subsystem doesn't exist any more.
The same message shows up if you try to use the 16-bit linker, so calm down guys...
Light travels faster than sound, that's why some people seem bright until you hear them.

madhur_ahuja

Quote from: sinsi on November 29, 2010, 10:50:25 AM
That message will show up in win64 (XPPro/Vista/Win7) if the exe is a 16-bit program (real mode DOS, win16 NE or OS/2), so there is no way of patching it to work - the subsystem doesn't exist any more.
The same message shows up if you try to use the 16-bit linker, so calm down guys...

Thanks. That's exactly what I was looking for :)

oex

We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

japheth

Quote from: sinsi on November 29, 2010, 10:50:25 AM
That message will show up in win64 (XPPro/Vista/Win7) if the exe is a 16-bit program (real mode DOS, win16 NE or OS/2), so there is no way of patching it to work - the subsystem doesn't exist any more.

Are these indeed ALL possible reasons?
Because recently there was someone complaining that the JWasm Win32 binary didn't run on his 64-bit system: http://social.answers.microsoft.com/Forums/en-US/w7programs/thread/8a8733ad-5532-41a7-9625-aba80ef51a11

Quote from: sinsi on November 29, 2010, 10:50:25 AM
The same message shows up if you try to use the 16-bit linker, so calm down guys...

But the "old, 16-bit" MS OMF linker v5.60 is also a true Win32 PE binary.


sinsi

Quote from: japheth on November 29, 2010, 11:23:39 AM
Are these indeed ALL possible reasons?
Because recently there was someone complaining that the JWasm Win32 binary didn't run on his 64-bit system: http://social.answers.microsoft.com/Forums/en-US/w7programs/thread/8a8733ad-5532-41a7-9625-aba80ef51a11
I am sure they aren't, there should be an e.g there. Is that problem (in the link) resolved? I have made programs with ml and fasm where windows spits out that message.
Something to do with alignment in some cases for me.

Quote from: japheth
But the "old, 16-bit" MS OMF linker v5.60 is also a true Win32 PE binary.
I think I am using 5.12 (Phar Lap, beleive it or not), although I have 5.60 and the one from lnk563
Light travels faster than sound, that's why some people seem bright until you hear them.

jj2007

Quote from: madhur_ahuja on November 29, 2010, 06:59:52 AM
I have seen that some programs which were written by me and assembled for x86 using ml.exe run fine on my Win 7 x64. I believe this is because of Wow technology....

Re 16-bit code: The professional versions of Win7-64 feature "XP mode", but it is not automatically installed, and Win7 will not tell you that it is not installed. It will simply complain that it could not solve your problem. More below.

Quotehttp://www.pcworld.com/businesscenter/article/181274/windows_7_what_you_should_know_about_xp_mode.html

Windows 7 Home Premium is available in 32-bit and 64-bit versions. The
32-bit version runs 32-bit and 16-bit software just fine. The 64-bit version
runs 64-bit and 32-bit software, but will NOT run 16-bit software. (No
64-bit MS operating system will run 16-bit software.)

For Home Premium, you will need to find a third party virtualization
solution. The MS Windows VPC is only installable on Professional,
Enterprise, and Ultimate Editions of Windows 7.

The Starter Edition of Windows 7 is 32-bit only, no 64-bit, and isn't widely
available. The Home Basic edition has been dropped.
http://www.velocityreviews.com/forums/t703181-windows-7-and-16-bit-software.html
P.S.: You are running an interesting blog at MSDN - Resolving Very Slow Symbol Loading with VS 2008 during debugging - sounds advanced :wink

madhur_ahuja

Quote from: jj2007 on November 29, 2010, 12:04:52 PM
Quote from: madhur_ahuja on November 29, 2010, 06:59:52 AM
I have seen that some programs which were written by me and assembled for x86 using ml.exe run fine on my Win 7 x64. I believe this is because of Wow technology....

Re 16-bit code: The professional versions of Win7-64 feature "XP mode", but it is not automatically installed, and Win7 will not tell you that it is not installed. It will simply complain that it could not solve your problem. More below.

Quotehttp://www.pcworld.com/businesscenter/article/181274/windows_7_what_you_should_know_about_xp_mode.html

Windows 7 Home Premium is available in 32-bit and 64-bit versions. The
32-bit version runs 32-bit and 16-bit software just fine. The 64-bit version
runs 64-bit and 32-bit software, but will NOT run 16-bit software. (No
64-bit MS operating system will run 16-bit software.)

For Home Premium, you will need to find a third party virtualization
solution. The MS Windows VPC is only installable on Professional,
Enterprise, and Ultimate Editions of Windows 7.

The Starter Edition of Windows 7 is 32-bit only, no 64-bit, and isn't widely
available. The Home Basic edition has been dropped.
http://www.velocityreviews.com/forums/t703181-windows-7-and-16-bit-software.html
P.S.: You are running an interesting blog at MSDN - Resolving Very Slow Symbol Loading with VS 2008 during debugging - sounds advanced :wink

I know about XP mode in Windows 7. But I think, even that will not allow 16 bit programs to run.

One of possible solution would be to run Dosbox and then instsall Win3.1 on it :)

sinsi

Quote from: madhur_ahuja on November 29, 2010, 12:10:43 PM
I know about XP mode in Windows 7. But I think, even that will not allow 16 bit programs to run.
Pretty sure it will, but not fullscreen (so no VESA DOS stuff). VMWare Player will though, and it's also free.

You can still install and run VPC in home editions, you ignore the message and it runs OK.
Light travels faster than sound, that's why some people seem bright until you hear them.

BogdanOntanu

Quote from: sinsi on November 29, 2010, 12:18:20 PM
...
You can still install and run VPC in home editions, you ignore the message and it runs OK.

Yes it does BUT you will have problems with any OS lower than XP, ie the OS will have sudden stalls (I presume because of  the use of HLT instruction in idle loops).

Hence using Virtual Box or Qemu or WMVare player can be a better alternative for running older 16 bits applications.
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro