System call return value

来源:互联网 发布:2017小猪cms源码下载 编辑:程序博客网 时间:2024/05/22 17:03

The return value from a system call is placed in the EAX register. It is your job to check the value in the EAX register, especially for failure conditions.

.section .bss.lcomm pid, 4.lcomm uid, 4.lcomm gid, 4.section .text.globl _start_start:movl $20, %eaxint $0x80movl %eax, pidmovl $24, %eaxint $0x80movl %eax, uidmovl $47, %eaxint $0x80movl %eax, gidend:movl $1, %eaxmovl $0, %ebxint $0x80



原创粉丝点击