aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <JozanLeClerc@noemail.net>2020-11-18 16:32:27 +0000
committerJozanLeClerc <JozanLeClerc@noemail.net>2020-11-18 16:32:27 +0000
commitfd93c3999636cbbc7f327a173ac1079c74c4bef5 (patch)
treeaac8e4e6c212f263109f676b3ddaa77ff76c32fd /src
parentIn progress (diff)
downloadbsdsetsid-fd93c3999636cbbc7f327a173ac1079c74c4bef5.tar.gz
bsdsetsid-fd93c3999636cbbc7f327a173ac1079c74c4bef5.tar.bz2
bsdsetsid-fd93c3999636cbbc7f327a173ac1079c74c4bef5.tar.xz
bsdsetsid-fd93c3999636cbbc7f327a173ac1079c74c4bef5.tar.zst
bsdsetsid-fd93c3999636cbbc7f327a173ac1079c74c4bef5.zip
Finally Makefile is goodio
FossilOrigin-Name: ecd68fea526e3457a8f54a8d8ee81ae51d816446
Diffstat (limited to 'src')
-rw-r--r--src/c_bsdsetsid.S24
1 files changed, 13 insertions, 11 deletions
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"