aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kapp Lindquist <andkaplin05@gmail.com>2025-10-29 10:26:31 +0100
committermithe24 <mithe24@student.sdu.dk>2025-10-29 13:49:57 +0100
commitdabb4db46db27b8f1607bef4bb12fe61a140297f (patch)
tree1f252f737354b57c03ee95787ebb0c9bd7b7277b
parentfb5ca7397323e56a20a10d69ada5540895b545c3 (diff)
downloadsorter-dabb4db46db27b8f1607bef4bb12fe61a140297f.tar.gz
sorter-dabb4db46db27b8f1607bef4bb12fe61a140297f.zip
chore(main): Removed redindant label
-rw-r--r--src/main.s5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.s b/src/main.s
index 64d38aa..b628d29 100644
--- a/src/main.s
+++ b/src/main.s
@@ -4,9 +4,11 @@
qsort:
.string "qsort"
+
.section .text
.globl _start
_start:
+
cmpq $2, (%rsp) # Check if there are only two arguments
jne algorithm_selected # If not, go to algorithm_selected
@@ -49,7 +51,7 @@ algorithm_selected:
select_insertionsort:
movq $insertion_sort, %r14 # Select insertion_sort in r14
jmp the_rest
-
+
select_quicksort:
movq $quicksort, %r14 # Select quicksort in r14
jmp the_rest
@@ -78,7 +80,6 @@ the_rest:
movq $1, %rdi
syscall
-end:
# Exit
movq $60, %rax
movq $0, %rdi # Exit code 0