Author Topic: Execution problem  (Read 6745 times)

Offline nasmuser

  • Jr. Member
  • *
  • Posts: 6
Execution problem
« on: August 28, 2012, 07:41:54 PM »
Hello !

I've got a big problem with nasm : no assembly program can be executed :



To sum up the message in english : windows thinks that the program isn't in x86 !
It is weird because nasm worked before. I have no code to give because even an empty one doesn't work !

Thank you !

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Execution problem
« Reply #1 on: August 28, 2012, 08:26:31 PM »
What changed since Nasm "worked before"? Looks like you've got a 64-bit system there. Is that "new"? A 64-bit system won't run DOS ("long mode" is not compatible with "v86 mode" - not MS's fault). One solution to this is to run "dosbox": http://www.dosbox.com

Another solution would be to write 32-bit code (which "should" run on a 64-bit system) or 64-bit code (which would take advantage of the new features). That may not be your problem, but that's what it looks like to me...

Best,
Frank


Offline nasmuser

  • Jr. Member
  • *
  • Posts: 6
Re: Execution problem
« Reply #2 on: August 29, 2012, 09:57:17 AM »
What changed since Nasm "worked before"?
Just several months, nothing more.

Looks like you've got a 64-bit system there. Is that "new"? A 64-bit system won't run DOS ("long mode" is not compatible with "v86 mode" - not MS's fault). One solution to this is to run "dosbox": http://www.dosbox.com
I don't think so, because the message says that the code can be in 32- or 64-bit mode.

Another solution would be to write 32-bit code (which "should" run on a 64-bit system) or 64-bit code (which would take advantage of the new features). That may not be your problem, but that's what it looks like to me...
Cannot be my problem because even empty code don't work :

Code: [Select]
org 100h

     ret

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Execution problem
« Reply #3 on: August 29, 2012, 10:27:04 AM »
Right. What you've got there is empty 16-bit code, and a 64-bit system won't run 16-bit code (I probably shouldn't have said "dos" - won't run any 16-bit code... I don't know what else it would be...). If it worked several months ago, that's a mystery!

I would again suggest "dosbox", or write 32- or 64-bit code like the message says...

Best,
Frank


Offline nasmuser

  • Jr. Member
  • *
  • Posts: 6
Re: Execution problem
« Reply #4 on: August 29, 2012, 03:51:13 PM »
Ok, but I have a problem with that dosbox since I've a special character in my name, even if I use tab key to get it !

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Execution problem
« Reply #5 on: August 30, 2012, 12:33:34 AM »
Well... change your name! :) Seriously, I can't get dosbox installed on my system, so I don't know what the solution might be - "reboot to dos" works for me.

I'm really puzzled that this "used to work"! A 64-bit system really "shouldn't" run 16-bit code, AFAIK. Is there an "xt compatible" option that you used to use, or something? I'm pretty much out of ideas. Dos is "obsolete" anyway, but it's convenient to start learning with. Bummer that it doesn't work anymore! I could show you Windows code using "-f obj" and Alink, but that's "obsolete" too. Maybe try the NASMX package?

http://nasmx.sf.net

Best,
Frank