NASM (computer program)

From Wikipedia, the free encyclopedia

NASM, the Netwide Assembler, is a free software Intel x86 assembler. It can be used to write both 16-bit and 32-bit (IA-32) programs. 32-bit programs can be written for NASM in such a way that they are portable between any 32-bit x86 OSes, if the right libraries are used.

NASM was originally written by Simon Tatham with assistance from Julian Hall, and is currently developed by a small team of maintainers at SourceForge. It was originally released under its own license, but this license was later changed to the GNU Lesser General Public License following a number of political problems caused by the choice of license.

NASM will output various binary formats on any machine, ranging from COFF (and the subtly different Portable Executable format used by Microsoft Windows) and a.out to ELF and the native Minix binary format. NASM even defines its own binary format, RDOFF, which is designed to be simple and efficient. This allows one to cross-assemble programs for one x86 operating system on a different, presumably more capable, one. In addition, NASM can create flat binary files, usable in writing boot loaders, ROM images, and various facets of OS development. NASM can run on non-x86 platforms, such as SPARC and PowerPC, though it cannot output programs usable by those machines.

NASM's overriding philosophy is to allow programmers familiar with Intel assembly language to use the appropriate approach that is easiest for the programmers to understand. Therefore, it uses the traditional Intel syntax for x86 assembly language (whereas other free assemblers, such as the GNU Assembler (GAS), use the AT&T syntax). It also avoids features such as automatic generation of segment overrides (and the related ASSUME directive) used by MASM and compatible assemblers, as these can often be confusing. If programmers keep track of the contents of segment registers and locations of variables they refer to themselves, the generated code has fewer surprises.

[edit] See also

[edit] Projects based on NASM

[edit] External links