aboutsummaryrefslogtreecommitdiff
path: root/src/main.s
diff options
context:
space:
mode:
authormithe24 <mithe24@student.sdu.dk>2025-10-28 00:09:01 +0100
committermithe24 <mithe24@student.sdu.dk>2025-10-29 13:49:57 +0100
commit9b78134668154cd704a52b65de2a22ce163b8917 (patch)
treedd82e736514a66cb5a8187d573845b2bf5b15452 /src/main.s
parent23706d7d9d79e3b7e6bc2079307a2574123d1d4f (diff)
downloadsorter-9b78134668154cd704a52b65de2a22ce163b8917.tar.gz
sorter-9b78134668154cd704a52b65de2a22ce163b8917.zip
I can't manually find the error in the output, yet check.py fails
Diffstat (limited to 'src/main.s')
-rw-r--r--src/main.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.s b/src/main.s
index bad6042..9c04823 100644
--- a/src/main.s
+++ b/src/main.s
@@ -15,8 +15,8 @@ _start:
# Sort
movq %rax, %rdi # Select address of array
- movq %r15, %rsi # Select length of array
- decq %rsi
+ leaq -1(%r15), %rcx # Select length of array -1 as high
+ xorq %rsi, %rsi # low = 0
movq $1, %rdx # Sort by key 1
call qsort # Sort the array