"Hello world!" with Nasm under Linux 
Author Message
 "Hello world!" with Nasm under Linux

Hi!

Could anyone send me a COMPLETE listing of a simple program written with
Nasm under
Linux that prints "Hello world!" on the screen?
Is it possible to write such a program ONLY using Nasm or there is need
to use gcc with a
simple main program written in C?

Thank you
Andrea



Thu, 27 Sep 2001 03:00:00 GMT  
 "Hello world!" with Nasm under Linux

Quote:

> Hi!
> Could anyone send me a COMPLETE listing of a simple program written with
> Nasm under
> Linux that prints "Hello world!" on the screen?
> Is it possible to write such a program ONLY using Nasm or there is need
> to use gcc with a
> simple main program written in C?
> Thank you
> Andrea

vi helloworld.c
i
#include <stdio.h>
int main(int ARGC, char *ARGV[])
{
 printf("Hello world from nasm !\n");
 return 0;
Quote:
}

<ESC>ZZ
gcc -c -S helloworld.c -o helloworld.S
cp helloworld.S helloworld.asm
vi helloworld.asm
LOTS of editing here to change AT&T synatx to nasm
nasm -f elf helloworld.asm
gcc helloworld.o -o helloworld
./helloworld
Hello world from nasm !

voila!
dominik behr



Thu, 27 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. "Hello world!" with Nasm under Linux

2. "Hello world"--with tacos--in NASM under Linux

3. "hello world" for nasm (linux)

4. coding "hello /options" (hello-world)

5. "Hello World!" in Color Forth

6. Malbolge "hello world"

7. "Hello World"

8. "Hello world", alternatives for devices with no display

9. Beginner's question:"Hello World"

10. LCG "Hello world"

11. "Hello, World!" in x86

12. "Hello World" does not work

 

 
Powered by phpBB® Forum Software