Hello,world!

 

.section .rodata
msg:
.asciz
"Hello,world!\n"

.section .text
.globl _start
_start:
pushl $msg
call printf

movl $
1, %eax
movl $
0, %ebx
int $0x80

 

/*
$ as -o hello.o hello.s
$ ld -dynamic-linker /lib/ld-linux.so.2 -lc -o hello hello.o
$ ./hello
Hello,world!
*/

 

 

posted @ 2010-07-02 21:00  penink  阅读(115)  评论(0)    收藏  举报