Author Topic: phase error detected at end of assembly  (Read 16617 times)


  • Guest
phase error detected at end of assembly
« on: October 15, 2004, 12:50:46 PM »
Why do i recive thise error:phase error detected at end of assembly ??Here is the code that generates this error:

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2527
  • Country: us
Re: phase error detected at end of assembly
« Reply #1 on: October 15, 2004, 05:19:47 PM »
Good question. It assembles without a whimper for me. What command line are you feeding Nasm?

The "phase error" message is intended to be generated if you give too small a number to the "-O" switch, and Nasm can't complete optimization in the specified maximum number of passes. At one time, "-O2" gave five passes, and -"O3" gave ten passes (or 10 and 15, maybe...), but the "special case" code has been removed, and now "-O2" (and greater) give just the specified number of passes. 2 or 3 are *not* enough for any but the simplest code - use a good big number - I like "-O999" - this is the *maximum* number of passes Nasm will make, so you won't slow things down by using too big a number. Too small will fail with that error message.

That message is *also* generated as a "bonus error message" if there's an undefined symbol... perhaps other errors would cause it... This isn't really intended...

Neither of these seem to be the case with your code. Even "-O2" is enough to assemble this code, and there don't seem to be any undefined symbols... I haven't actually tested it (not in dos at the moment), but it assembles fine for me, and looks correct. So... what command line? Any other error messages besides "phase error"?



  • Guest
Re: phase error detected at end of assembly
« Reply #2 on: October 15, 2004, 10:49:30 PM »
I can't reproduce your problem when I assemble
this with NASM 0.98.38. I have tried BIN, and
various levels of -O. Which version do you use
and which arguments to you feed it?


SMF spam blocked by CleanTalk