about summary refs log tree commit diff stats
path: root/tests32/test01.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests32/test01.c')
-rw-r--r--tests32/test01.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests32/test01.c b/tests32/test01.c
new file mode 100644
index 00000000..3cf91ceb
--- /dev/null
+++ b/tests32/test01.c
@@ -0,0 +1,19 @@
+#include <sys/syscall.h> 
+#include <unistd.h>                                      
+                                                                                
+int main(int argc, char **argv)                                                 
+{                                                                               
+    const char msg[] = "Hello World!\n";
+    //syscall(4, STDOUT_FILENO, msg, sizeof(msg)-1);
+    asm (
+        "movl $4, %%eax \n"
+        "movl $1, %%ebx \n"
+        "movl %0, %%ecx \n"
+        "movl $13, %%edx \n"
+        "int $0x80 \n"
+    :
+    :"r" (msg)
+    :"%eax","%ebx","%ecx","%edx"
+    );
+    return 0;                                                                   
+}