From fd93c3999636cbbc7f327a173ac1079c74c4bef5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 18 Nov 2020 16:32:27 +0000 Subject: Finally Makefile is goodio FossilOrigin-Name: ecd68fea526e3457a8f54a8d8ee81ae51d816446 --- src/c_bsdsetsid.S | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/c_bsdsetsid.S b/src/c_bsdsetsid.S index d9b1067..4d202dd 100644 --- a/src/c_bsdsetsid.S +++ b/src/c_bsdsetsid.S @@ -1,19 +1,21 @@ -.data -str: - .asciz "a string\n" - .text -.globl _start - -_start: - jmp c_main +.globl main c_main: movq $0x1, %rdi leaq str, %rsi - movq $0x9, %rdx - movq $0x4, %rax + movq $0xa, %rdx + movb $0x4, %al syscall + retq + +main: + xorq %rax, %rax + callq c_main + xorq %rax, %rax xorq %rdi, %rdi - movq $0x1, %rax + movb $0x1, %al syscall + +.data + str: .asciz "a string\n" -- cgit v1.2.3