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

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Thu Jan 31 12:51:35 PST 2019


            Bug ID: 3392553
           Summary: Write source for AND but NASM produces ADD
           Product: NASM
           Version: 2.14.xx
          Hardware: PC
                OS: Windows
            Status: OPEN
          Severity: major
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: stoochie at dalekeller.net
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Binary from nasm.us

Created attachment 411712
  --> https://bugzilla.nasm.us/attachment.cgi?id=411712&action=edit
Source file with line 60:  AND AX,0x0040

My source code has this line:  AND AX,0x0040
Older versions of NASM produce:  0x25 0x40 0x00
That resulting binary appears correct.

Newer versions of NASM produce:  0x83 0xE0 0x40
That binary appears to be an ADD instruction instead of an AND.

You can see the problem in both the resulting *.COM and *.LST files.

Versions 2.08.02 and older produce correct code.
Versions 2.09 and up through 2.14.xx produce the bad code.

Code is in attachment TEST0002.ASM, and the instruction with the problem is at
line 60.

Assembled with:  nasm test0002.asm -f bin -o test0002.com -l test0002.lst

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