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

c_main:
	movq	$0x1, %rdi
	xorq	%rcx, %rcx
	inc		%rcx
	movq	(%rdx, %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"