aboutsummaryrefslogtreecommitdiff
path: root/src/main.s
diff options
context:
space:
mode:
authormithe24 <mithe24@student.sdu.dk>2025-10-26 15:38:43 +0100
committermithe24 <mithe24@student.sdu.dk>2025-10-29 13:49:57 +0100
commit2e39f481369d708cf2c723136c3bf4c765d6c994 (patch)
tree0e5d7b8588ad8d31875725cfabbc17d876037038 /src/main.s
parent88d4c92a5a757ed4ee88373e9ae53bfe27041e7f (diff)
downloadsorter-2e39f481369d708cf2c723136c3bf4c765d6c994.tar.gz
sorter-2e39f481369d708cf2c723136c3bf4c765d6c994.zip
fix(printing & int2str): Better printing and int to string func
Diffstat (limited to 'src/main.s')
-rw-r--r--src/main.s11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.s b/src/main.s
index 318bb02..196515f 100644
--- a/src/main.s
+++ b/src/main.s
@@ -19,10 +19,17 @@ _start:
movq $1, %rdx # Sort by key 1
call qsort # Sort the array
- # Print array
+ # Convert array to string
+ # in tsv format
movq %rax, %rdi # Select the pointer to the array
movq %r15, %rsi # Select length of array
- call print_buffer # Print array
+ call tub2tsv # Print array
+
+ # print string to stdout
+ movq %rax, %rsi
+ movq $1, %rax
+ movq $1, %rdi
+ syscall
# Exit
movq $60, %rax