nasm


The Netwide Assembler. Special edition for Win32 and BeOS.
http://nasm.sourceforge.net
http://www.realtech-vr.com/nasm

What is Nasm ?


The Netwide Assembler, NASM, is an 80x86 assembler designed for portability and modularity. It supports a range of object file formats, including Linux and NetBSD/FreeBSD a.out, ELF, COFF, Microsoft 16-bit OBJ and Win32. It will also output plain binary files. Its syntax is designed to be simple and easy to understand, similar to Intel's but less complex. It supports Pentium, P6, MMX, 3DNow!, SSE and SSE2 opcodes, and has macro capability.

IMPORTANT The Windows version is a bit outdated. Please follow this link in order to get the latest version 0.98.39.

Why this web site


NASM is primally an Linux project. This web site provide installation package for Windows 9x/NT/2k/XP and BeOS
Release 5, additionnal installation notes for Visual Studio Integration and BeIDE integration and CHM documentation format.

Installing NASM under Windows


Once you've obtained the Win32 archive for NASM, nasmw-inst-XXX.exe (where XXX denotes the version number of NASM
contained in the archive), double click on the auto installer program and install it into its own directory
(for example C:\Program Files\NASM).

The archive will contain two executable files: the NASM executable files nasmw.exe, and the NDISASM executable files ndisasm.exe and ndisasmw.exe. In each case, the file whose name ends in w is a Win32 executable, designed to run under Windows 95 or Windows NT Intel

Integration within Microsoft Visual Studio 6
Since 0.95.36, NASM is fully officially compatible with Microsoft Visual Studio 6 / .NET

- In Tools/Options/Directories, Select 'Show directories for:' into 'Executable files'. Add a new path "C:\Program Files\NASM" (or where you have installed Nasm)
- In your project workspace, create a new folder 'Assembler Files'.
- On this folder, right click and select 'Settings.'
- In General, enable 'Always use custom build step'.
- In Custom Build, change the following settings :

Integration within Microsoft Visual .NET 2003/2005/2008

- In Tools/Options/Projects, Select 'VC++ Directories ' and 'Show directories for:' 'Executable files' - Should be the default.
Press Ctrl-Insert or press the 'New Line' icon. Select the path "C:\Program Files\NASM" (or where you have installed Nasm)
- In your project workspace, create a new folder 'Assembler Files'.
- On this folder, right click and select 'Settings.'
- In General, enable 'Always use custom build step'.
- In Custom Build, change the following settings :


Commands
nasmw.exe -f win32 -Xvc -o "$(IntDir)\$(InputName).obj" $(InputDir)\$(InputName).asm

Outputs
"$(IntDir)\$(InputName).obj"


Installing NASM under BeOS


Once you've obtained the BeOS archive for NASM, nasm-beos-XXX.pkg (where XXX denotes the version number of NASM contained in the archive), double click on the auto installer program and install it into its own directory

How to use NASM within BeIDE


Since BeOS 5, NASM is supported with the NASM Integration plugin

- Open the Project Settings option,
- Add a new target '.asm' and choose tool 'nasm'.
- Add your .ASM files in your project.
- Alternatively, select .CC and change to ASM and NASM.

How to write a simple Assembler routine with NASM.


ASM file:

[bits 32]
[section .bss align=16]
[section .data align=16]
[section .text align=16]
[global _myFunction]
_myFunction:
push ebp
mov ebp,esp
mov eax, [ebp + 8] ; // type your code here.
pop ebp
ret
END

C file:

if using MSC, to exports the procedure :
int cdecl myFunction(int parameter);

if using GCC, to exports the procedure :
int _myFunction(int parameter);



How to contact author ?


You can leave a message on the message board here.

Getting NASM special edition



0.98.36
-------
* Update rdoff - librarian/archiver - common rec - docs!
* Fix signed/unsigned problems.
* Fix JMP FAR label and CALL FAR label.
* Add new multisection support - map files - fix align bug
* Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
* "Q" or "O" suffixes indicate octal
* Support Prescott new instructions.
* Cyrix XSTORE instruction.

And also, NASM documentation is provided in CHM version for the Windows Package.

Download for BeOS 5 / Zeta BeOS 5 installation. 286 KB
Download for Windows Win32 installation. 634 KB
File
 
Operating system  


(C) Copyright 1999-2004 realtech VR. All rights reserved. NASM is under LGPL. Please see the file Licence, supplied as part of any NASM distribution archive, for the licence conditions under which you may use NASM.

Valid HTML 4.01!