1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-10-31 19:06:15 +00:00
random-stuff/hello.s

17 lines
291 B
ArmAsm
Raw Normal View History

2020-08-12 18:16:20 +00:00
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