diff options
Diffstat (limited to 'zap/source/arm/sys/syscall.s')
-rw-r--r-- | zap/source/arm/sys/syscall.s | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/zap/source/arm/sys/syscall.s b/zap/source/arm/sys/syscall.s deleted file mode 100644 index c4f8d40..0000000 --- a/zap/source/arm/sys/syscall.s +++ /dev/null @@ -1,32 +0,0 @@ -@ Copyright 2022-2023 Gabriel Jensen. -@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. - -.syntax unified - -.arm - -.globl zap_syscall - -zap_syscall: - @ System calls on ARM EABI use the following registers: - @ r0 : System call identifier - @ r1 : First parameter - @ r2 : Second parameter - @ r3 : Third parameter - @ r4 : Fourth parameter - @ r5 : Fifth parameter - @ r6 : Sixth parameter - @ r0 : Return value - push {r4-r5,r7,lr} @ Remember that the parameters are now further up the stack. - mov r7,r0 @ Move the identifier. - mov r0,r1 @ Place parameters. - mov r1,r2 - mov r2,r3 - ldr r3,[sp,0x10] @ Get the remaining parameters from the stack. - ldr r4,[sp,0x14] - ldr r5,[sp,0x18] - svc 0x0 @ Divinity - pop {r4-r5,r7} @ Restore the registers. - pop {r0} - bx r0 |