From 6f71209f637fd18d9a464700ea73e5003889f2e6 Mon Sep 17 00:00:00 2001 From: Navid Samanghoon Date: Wed, 8 Oct 2025 13:44:01 +0200 Subject: fix(outputGenerator): fixing pointer problem --- src/outputGenerator.s | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/outputGenerator.s') 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 -- cgit v1.2.3-70-g09d2