TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: JAN WAGEMAKERS
from: JAMES VAHN
date: 1997-04-17 12:17:00
subject: NASM & Linux

 JW> There are demos included, but so far I can see they are
 JW> written to be called from a C-program. I was wondering how I
 JW> can write a 100% pure assembly program with NASM under
 JW> Linux.
Seems you assemble it first:
   nasm -f elf hello.asm
which gives you an ELF object file.  Then link it like so:
   gcc hello.o -o hello
I get as far as linking with gcc, which aborted with a signal 11 bug
that apparently has been fixed in 0.94.
;-------------NASM's standalone Hello-World.asm for Linux --------
section .text
extern puts
global main
main:    
   push dword msg
   call puts
   add esp, byte 4
   ret
msg:
   db "Hello World!",0            
--- timEd 1.01
---------------
* Origin: James Vahn (jvahn@short.circuit.com) (1:346/15.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.