summaryrefslogtreecommitdiff
path: root/src/__sys.x86-64.s
blob: 02fd3dbb889a096e516a5ee29f12b5a514ab9f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.global __syscall
__syscall:
	mov %rdi, %rax
	mov %rsi, %rdi
	mov %rdx, %rsi
	mov %rcx, %rdx
	mov %r8,  %r10
	mov %r9,  %r8
	mov 8(%rsp), %r9
	syscall
	ret

.global _start
_start:
	popq %rdi
	movq %rsp, %rsi
	call __main