printf integer

作者在 2010-12-20 21:14:35 发布以下内容
#int_printf.s  printf int

.data
a:
    .long 4
str:
    .ascii "the a is 'xxxx'\n"

.text
.global _start
_start:
    movl  a, %eax
    or $0x30, %eax
    movl $str, %edi
    movl %eax, 10(%edi)
    movl $4, %eax
    movl $1, %ebx
    movl $str, %ecx
    movl $17, %edx
    int  $0x80

    movl $1, %eax
    movl $0, %ebx
    int  $0x80
汇编 | 阅读 1133 次
文章评论,共1条
aqaq110
2011-02-10 12:21
1
<img src="image/face/1.gif" class="face">
游客请输入验证码