From 74178a6a2dfe18012e135fa059efdb581cdffc40 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Wed, 25 Jun 2025 13:43:06 +0200 Subject: [PATCH] FIX: Loading arg from stack to wrong register (rsi->rdi) for %d --- console.asm | 2 +- tests.asm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/console.asm b/console.asm index e7cf03c..3efd0e9 100644 --- a/console.asm +++ b/console.asm @@ -86,7 +86,7 @@ printf: je .rep_d_r9 ;get from stack - mov rsi, qword [rbp + 16 + (r10-5)*8] + mov rdi, qword [rbp + 16 + (r10-5)*8] jmp .convertInt .rep_d_rsi: diff --git a/tests.asm b/tests.asm index 28b4edc..8866899 100644 --- a/tests.asm +++ b/tests.asm @@ -233,7 +233,7 @@ main: lea r8, [rel tS4] lea r9, [rel tS5] push tS9 - push qword [num1] + push qword [rel num1] push tS8 push tS7 push tS6