summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkiz <skiznet@aol.com>2024-08-29 15:43:41 -0400
committerSkiz <skiznet@aol.com>2024-08-29 15:43:41 -0400
commit729f3cea5b874defdfe27545a2449a026662595d (patch)
tree070da0c56f09c7f84375648276723e64d427d6b5
parent6852aad8dc09f78367fac7fcd12c3d2711c976b7 (diff)
Made "Hello, World!" in ASM.
-rw-r--r--src/first.s12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/first.s b/src/first.s
index f778dee..e46b502 100644
--- a/src/first.s
+++ b/src/first.s
@@ -3,9 +3,17 @@
_start:
- ; sys_write (print)
+ // sys_write (print)
+ mov rax, 1
+ mov rdi, 1
+ lea rsi, [hello_world]
+ mov rdx, 14
+ syscall
- ; sys_exit
+ // sys_exit
mov rax, 60
mov rdi, 69
syscall
+
+hello_world:
+ .asciz "Hello, World!\n"