diff --git a/include/asm.h b/include/asm.h index 05f9c34..ce6c16d 100644 --- a/include/asm.h +++ b/include/asm.h @@ -38,6 +38,11 @@ // #define interrupt(n) asm volatile ("int %0" : : "N" (n) : "cc", "memory") +// +// Trigger a system call +// +#define syscall(n) asm volatile ("movq %0, %rdi\nint $0x80" : : "N" (n) : "cc", "memory") + // // Returns whether IRQs are enabled //