summaryrefslogtreecommitdiff
path: root/amd64/hello-world.s
blob: fc3e3f420115135b8853e3e60496404f65e1161d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
global _start

section .text

_start:
	mov rax, 1        ; write
	mov rdi, 1        ; stdout
	mov rsi, msg
	mov rdx, msglen
	syscall

	mov rax, 60       ; exit
	mov rdi, 0
	syscall

section .rodata
	msg: db "Hello, world!", 10
	msglen: equ $ - msg