[Nasm-bugs] [Bug 3392827] 'pops' bug for example: pops ds makes an opcode 3Eh instead of giving syntax error about 'pop' inst.

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sun Dec 25 08:37:25 PST 2022


https://bugzilla.nasm.us/show_bug.cgi?id=3392827

C. Masloch <pushbx at ulukai.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pushbx at ulukai.org

--- Comment #1 from C. Masloch <pushbx at ulukai.org> ---
What you're seeing is NASM interprets "pops" as a label without a colon, which
does not cause a warning because it is not an "orphan" label. (That is there is
something following it on the same line.)

The instruction is read as "ds" then which is valid as a stand alone segment
prefix to NASM. That's why you get the unexpected segment override prefix and
no warning or error.

If you had written "pops ds" twice then NASM would give a duplicate label
error.

If you want NASM to warn you about this (and all non-equ labels without
colons), I would advertise my patch to add a label-no-colon warning in
https://bugzilla.nasm.us/show_bug.cgi?id=3392632

-- 
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