blob: 83d52ce928cd20690124048aa537e7f974c8ab91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Write "hello world" and exit
.include "linux.s"
.section .data
helloworld:
.ascii "hello world\n"
helloworld_end:
.equ helloworld_len, helloworld_end - helloworld
.section .text
.globl _start
_start:
movq $STDOUT, %rdi
movq $helloworld, %rsi
movq $helloworld_len, %rdx
movq $SYS_WRITE, %rax
syscall
movq $0, %rdi
movq $SYS_EXIT, %rax
syscall
|