# sctest2.s - example of getting a return value from a system call
.section .bss
.lcomm pid, 4 # SC to retrieve the process ID of the running program
.lcomm uid, 4 # SC to retrieve the user ID of the person running the program
.lcomm gid, 4 # SC to retrieves the group ID of the person running the program
.section .text
.globl _start
_start:
movl $20, %eax
int $0x21 # int $0x80
movl %eax, pid
movl $24, %eax
int $0x21 # int $0x80
movl %eax, uid
movl $47, %eax
int $0x21 # int $0x80
movl %eax, gid
end:
movl $1, %eax
movl $0, %ebx
int $0x21 # int $0x80

