summaryrefslogtreecommitdiff
path: root/tests/projects/asm/yasm/src/main_elf.S
blob: cd039bbaef1426b5124a4b8d837d19f4e5ac7637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
bits 64

extern puts

section .data

message:
  db 'hello xmake!', 0

section .text

global main
main:
  push rbp
  mov rbp, rsp
  lea rdi, [rel message]
  call puts
  xor rax, rax
  pop rbp
  ret