Next Chapter | Previous Chapter | Contents | Index
This chapter describes some of the common problems that users have been known to encounter with NASM, and answers them. It also gives instructions for reporting bugs in NASM if you find a difficulty that isn't listed here.
We sometimes get `bug' reports about NASM generating inefficient, or
even `wrong', code on instructions such as
Similarly, people complain that when they issue conditional jumps (which
are 
This, again, is partly a predictability issue, but in fact has a more
practical reason as well. NASM has no means of being told what type of
processor the code it is generating will be run on; so it cannot decide for
itself that it should generate 
ORG People writing boot sector programs in the 
        ORG 0 
        ; some boot sector code 
        ORG 510 
        DW 0xAA55
This is not the intended use of the 
        ORG 0 
        ; some boot sector code 
        TIMES 510-($-$$) DB 0 
        DW 0xAA55
The 
TIMES The other common problem with the above code is people who write the
        TIMES 510-$ DB 0
by reasoning that 
NASM is a modular assembler: the various component parts are
designed to be easily separable for re-use, so they don't exchange
information unnecessarily. In consequence, the
The solution, as in the previous section, is to code the
        TIMES 510-($-$$) DB 0
in which 
We have never yet released a version of NASM with any known
bugs. That doesn't usually stop there being plenty we didn't know about,
though. Any that you find should be reported firstly via the
Please read section 2.2 first, and don't report the bug if it's listed in there as a deliberate feature. (If you think the feature is badly thought out, feel free to send us reasons why you think it should be changed, but don't just send us mail saying `This is a bug' if the documentation says we did it on purpose.) Then read section 12.1, and don't bother reporting the bug if it's listed there.
If you do report a bug, please give us all of the following information:
NASMENV