[Nasm-bugs] [Bug 3392553] Write source for AND but NASM produces ADD

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Mon Feb 4 16:18:47 PST 2019


stoochie at dalekeller.net changed:

           What    |Removed                     |Added
                 CC|                            |stoochie at dalekeller.net

--- Comment #3 from stoochie at dalekeller.net ---
Yes, I discovered that too, when I dug out a newer datasheet (I had been
looking an an 80186 one). Which led me to the real problem, which I think is
another bug.

If I assemble these lines:
  CPU 8086
  SHL AL,4
NASM correctly says "no instruction for this cpu level", because that's a 386
instruction. So I know it's checking instructions for the processor level.

But if I assemble these lines:
  CPU 8086
  AND AX,0x0040
with optimization turned off (-O0) it gives the expected 8086 instruction, but
with optimization turned on (-Ox) it gives the 386 instruction. So the
assembler honors the CPU 8086 directive, but the optimizer does not.

You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.

More information about the Nasm-bugs mailing list