PDA

View Full Version : More with NASM



Lurker
11-12-2003, 07:07 PM
I downloaded the NASM 32 bit windows binaries, it included NASM.exe and ndisasm.exe, now how do I compile .asm files into .exe executables? Also, where are some good NASM tutorials? Thanks :D !

Iamien
11-12-2003, 11:05 PM
In nasm fodler
nasm.exe somefile.asm -o output.exe

Fordy
11-13-2003, 04:13 AM
There's all the information you need on building for various platforms within the documentation provided with NASM.

Failing that, there's up to date documentation and good information on the sourceforge site that you already know about.

Again...failing that there's a wealth of info on google

Lurker
11-13-2003, 05:28 PM
I tried Iamiens way with this code:


section .data
msg db 'Yay, my first NASM program!!!',0x0A
len equ $ - msg
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, len
int 0x80
mov eax, 1
int 0x80

Compiled fine, but came up with an error on run. Compiled like this:
NASM test.asm -o test.exe
Anyone know the problem? And I'll look on Google some more...