29 lines
308 B
ArmAsm
29 lines
308 B
ArmAsm
.extern _syscall
|
|
.global syscall
|
|
syscall:
|
|
mov $0x10, %edx
|
|
mov %ax, %ds
|
|
mov %ax, %es
|
|
mov %ax, %fs
|
|
mov %ax, %gs
|
|
|
|
mov %esp, %edx
|
|
mov $0x00f00000, %esp
|
|
push 0x10(%edx)
|
|
push 0x0C(%edx)
|
|
push 0x08(%edx)
|
|
push 0x04(%edx)
|
|
push 0x00(%edx)
|
|
|
|
push %ecx
|
|
push %ebx
|
|
push %eax
|
|
|
|
call _syscall
|
|
|
|
pop %eax
|
|
pop %ebx
|
|
pop %ecx
|
|
iret
|
|
|