os_kernel_lab/related_info/lab4/some-exercises/callee.s

18 lines
364 B
ArmAsm
Raw Normal View History

2016-04-11 00:58:26 +08:00
.code32
SYSWRITE = 4 # sys_write()
.global mywrite
.text
mywrite:
pushl %ebp
movl %esp, %ebp
pushl %ebx
movl 8(%ebp),%ebx # ebx
movl 12(%ebp),%ecx # ecx
movl 16(%ebp),%edx # edx
movl $SYSWRITE,%eax # eax
int $0x80
popl %ebx
mov %ebp, %esp
popl %ebp
ret