summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/test.c b/test.c
index c80d8b6..e2db834 100644
--- a/test.c
+++ b/test.c
@@ -1,6 +1,12 @@
+#include <stdio.h>
int x;
-void entry() {
- x += 1;
- __asm__("xor %ebx, %ebx\n"
- "int $0x80\n");
+void main() {
+ x = 123;
+ printf("hi");
+ __asm__ ("movl $1, %%eax\n"
+ "movl %0, %%ebx\n"
+ "int $0x80\n"
+ :
+ : "r" (x) : "ebx", "eax");
+
}