diff --git a/include/syscalls.i b/include/syscalls.i index 01060cd..160777c 100644 --- a/include/syscalls.i +++ b/include/syscalls.i @@ -19,4 +19,6 @@ __STD_SYSCALLS_I equ 1 ; Returns the range start in a0 ; Permission flags in d2 xref syscall_vmem_map_free_to +; Sets the permission flags of the range of virtual pages starting at address a0 with length d1 to d0 + xref syscall_vmem_set_flags endif diff --git a/syscalls.68k b/syscalls.68k index 9ebb13d..a9c5525 100644 --- a/syscalls.68k +++ b/syscalls.68k @@ -67,4 +67,14 @@ syscall_vmem_map_free_to: trap #0 move.l (a7)+, d3 rts - + + public syscall_vmem_set_flags +; Sets the permission flags of the range of virtual pages starting at address a0 with length d1 to d0 +syscall_vmem_set_flags: + move.l d2, -(a7) + move.l d1, d2 + move.l d0, d1 + move.l #7, d0 + trap #0 + move.l (a7)+, d2 + rts