1
0
mirror of https://github.com/osmarks/random-stuff synced 2025-11-17 14:07:15 +00:00

initial commit v2

This commit is contained in:
2020-08-12 19:16:20 +01:00
commit 548f9ba9c1
14 changed files with 1130 additions and 0 deletions

16
hello.s Normal file
View File

@@ -0,0 +1,16 @@
BITS 64
GLOBAL _start
SECTION .text
msg: db "Hello, World!"
len: equ $-msg
_start:
; initialize stuff for `write` syscall
mov rax, 1 ; write
mov rdi, 1 ; fd 1 (stdout)
mov rsi, $msg ; write from `msg`
mov rdx, $len ; write `len` bytes
syscall
; exit
mov rax, 60
mov rdi, 0
syscall