bible_doc/docs/files/code/do_syscall.S

6 lines
349 B
ArmAsm

mov.l syscall_number, r0 # Store the syscall ID in r0
mov.l do_syscall, r2 # Set r2 to the syscall function
jmp @r2 # jump to r2 (syscall)
nop # delayed jump so do nothing
.align 4 # do_syscall is already aligned but I prefered
do_syscall: .long 0x80010070