aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/outputGenerator.s8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/outputGenerator.s b/src/outputGenerator.s
index d547c59..23caecc 100644
--- a/src/outputGenerator.s
+++ b/src/outputGenerator.s
@@ -59,7 +59,8 @@ print_buffer:
loop:
# print x and tab
- movq (%rdx), %rdi # load x
+ movq (%rdx), %rdi # load the pointer of x
+ movq(%rdi), %rdi # load the number it self
call print_num
push %rdx # save pointer
push %rsi # save n
@@ -68,7 +69,8 @@ loop:
pop %rdx # retrieve pointer
# print y and newline
- movq 8(%rdx), %rdi # load y
+ movq (%rdx), %rdi # load the pointer of y
+ movq 8(%rdi), %rdi # load the number it self
call print_num
push %rdx # save pointer
push %rsi # save n
@@ -77,7 +79,7 @@ loop:
pop %rdx # retrieve pointer
# move to next coordinate and decq n
- addq $16, %rdx
+ addq $8, %rdx
decq %rsi
cmpq $0, %rsi