summaryrefslogtreecommitdiff
path: root/src/first.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/first.asm')
-rw-r--r--src/first.asm19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/first.asm b/src/first.asm
new file mode 100644
index 0000000..e46b502
--- /dev/null
+++ b/src/first.asm
@@ -0,0 +1,19 @@
+.global _start
+.intel_syntax noprefix
+
+_start:
+
+ // sys_write (print)
+ mov rax, 1
+ mov rdi, 1
+ lea rsi, [hello_world]
+ mov rdx, 14
+ syscall
+
+ // sys_exit
+ mov rax, 60
+ mov rdi, 69
+ syscall
+
+hello_world:
+ .asciz "Hello, World!\n"