ref: 42d8c26769b81b40e790cf4de86f86e1c4193841
parent: 4932534d5f4a6cba82ce1a0a67b6b84cbe6bfa26
author: Ori Bernstein <[email protected]>
date: Sat Jul 21 16:20:44 EDT 2012
Compile on OSX
--- a/syscall.s
+++ b/syscall.s
@@ -31,3 +31,12 @@
movl %ebp,%esp
popl %ebp
ret
+
+.globl _std$syscall
+_std$syscall:
+ popl %ecx /* return address */
+ popl %eax /* call num */
+ pushl %ecx
+ int $0x80
+ pushl %ecx /* put the return address back */
+ ret