summaryrefslogtreecommitdiff
path: root/src/nonstd/x86-32.s
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-08 18:45:05 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-08 18:45:05 -0500
commit84217308cf704fda8a9db817b458ccadf444efe9 (patch)
tree1d65e1610c22d6a68c90d67f4c7f3b147bfa151f /src/nonstd/x86-32.s
parent7ef8a7379f7f7d09e71ccae2a0b688c3cd80423f (diff)
add headers and assembly
Diffstat (limited to 'src/nonstd/x86-32.s')
-rw-r--r--src/nonstd/x86-32.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nonstd/x86-32.s b/src/nonstd/x86-32.s
new file mode 100644
index 00000000..ad60201d
--- /dev/null
+++ b/src/nonstd/x86-32.s
@@ -0,0 +1,18 @@
+.global __syscall
+__syscall:
+ mov 4(%esp), %eax
+ mov 8(%esp), %ebx
+ mov 12(%esp), %ecx
+ mov 16(%esp), %edx
+ mov 20(%esp), %esi
+ mov 24(%esp), %edi
+ mov 28(%esp), %ebp
+ sysenter
+ ret
+
+/* FIXME: this seems to be unpossible to put in a shared library */
+/* FIXME: it may be worthwhile to separate this into crt1.s */
+.global _start
+_start:
+ /* TODO */
+ call __libc_start