您的位置:首页 > 其它

汇编的hello world

2009-10-28 17:59 246 查看
调用linux system call

.section .rodata

output:

.string "Hello, World/n"

.section .text

.globl _start

nop

movl $4, %eax

movl $1, %ebx

movl $output, %ecx

movl $13, %edx

int $0x80

movl $1, %eax

movl $0, %ebx

int $0x80

使用c的函数printf

.section .rodata

output:

.string "Hello, World/n"

.section .text

.globl _start

nop

pushl $output

call printf

addl $4, %esp

pushl $0

call exit
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: