aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_bsdsetsid.S
blob: 73ab5823c721bcc4b54e2060db189ae8a15e4e7c (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
26
27
28
.text
.extern u_strlen
.globl main

main:
	xorq	%rcx, %rcx
	movq	(%rsi, %rcx, 8), %rsi
	movq	%rsi, %rdi
	callq	u_strlen
	movq	$0x1, %rdi
	movq	%rax, %rdx
	xorq	%rax, %rax
	movb	$0x4, %al
	syscall
	movq	$0x1, %rdi
	leaq	nl, %rsi
	movq	$0x1, %rdx
	xorq	%rax, %rax
	movq	$0x4, %rax
	syscall
	xorq	%rax, %rax
	xorq	%rax, %rax
	xorq	%rdi, %rdi
	movb	$0x1, %al
	syscall

.data
	nl: .asciz "\n"