From 12827bb1a178484a025e6066d0e341795851aa89 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Wed, 9 Jul 2025 11:41:21 +0200 Subject: [PATCH] Add %i in printf test --- src/tests.asm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tests.asm b/src/tests.asm index 62e2da1..0f85127 100644 --- a/src/tests.asm +++ b/src/tests.asm @@ -58,8 +58,8 @@ section .rodata printf3C7 equ 'y' printf3Str1 db "friend",EOS printf3C8 equ '!' - printf4 db TAB,"printf(",DQUO,"%d|%u , %d|%u\n",DQUO,", -50, -50, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF): ",NL,TAB,TAB,EOS - printf4Str db "%d|%u , %d|%u",NL,EOS + printf4 db TAB,"printf(",DQUO,"%i|%d|%u , %i|%d|%u\n",DQUO,", -50, -50, -50, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF): ",NL,TAB,TAB,EOS + printf4Str db "%i|%d|%u , %i|%d|%u",NL,EOS printf5 db TAB,"printf(",DQUO,"%x|%X , %x|%X\n",DQUO,", 0xabcdeffedcba, 0x069bc0e, 666, -1): ",NL,TAB,TAB,EOS printf5Str db "%x|%X , %x|%X",NL,EOS @@ -206,9 +206,13 @@ _start: lea rdi, [rel printf4Str] mov rsi, -50 mov rdx, -50 - mov rcx, 0xFFFFFFFFFFFFFFFF + mov rcx, -50 mov r8, 0xFFFFFFFFFFFFFFFF + mov r9, 0xFFFFFFFFFFFFFFFF + push 0xFFFFFFFFFFFFFFFF + sub rsp, SIZE_QWORD call printf + add rsp, SIZE_QWORD ; TEST 5 lea rdi, [rel printf5]