summaryrefslogtreecommitdiff
path: root/src/user/hello/hello.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/hello/hello.asm')
-rw-r--r--src/user/hello/hello.asm28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/user/hello/hello.asm b/src/user/hello/hello.asm
new file mode 100644
index 0000000..cc0645a
--- /dev/null
+++ b/src/user/hello/hello.asm
@@ -0,0 +1,28 @@
+bits 32
+
+global _entry
+
+section .text
+_entry:
+ mov eax, 0x05
+ mov ebx, esi
+ mov ecx, data.len
+ mov edx, data
+ int 0x30
+
+ int 0x38
+
+section .rodata
+data:
+ dd 0xb
+ dd .str_len
+ dd 0
+
+.str:
+ db "Hello, world!", 0x0a
+.str_len equ $ - .str
+
+ dd 0x02
+ dd 0
+ dd 0
+.len equ $ - data \ No newline at end of file