aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_bsdsetsid.S
blob: 55807e1ff10a0cf16bb3a9863d22703bfbd02030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.text
.globl main

c_main:
	movq	$0x1, %rdi
	xorq	%rcx, %rcx
	movq	8(%rsp, %rcx, 8), %rsi
	movq	$0xa, %rdx
	movb	$0x4, %al
	syscall
	retq

main:
	xorq	%rax, %rax
	callq	c_main
	xorq	%rax, %rax
	xorq	%rdi, %rdi
	movb	$0x1, %al
	syscall

.data
	str: .asciz "a string\n"