Add %i in printf test

This commit is contained in:
2025-07-09 11:41:21 +02:00
parent 881d88ec4e
commit 12827bb1a1

View File

@@ -58,8 +58,8 @@ section .rodata
printf3C7 equ 'y' printf3C7 equ 'y'
printf3Str1 db "friend",EOS printf3Str1 db "friend",EOS
printf3C8 equ '!' printf3C8 equ '!'
printf4 db TAB,"printf(",DQUO,"%d|%u , %d|%u\n",DQUO,", -50, -50, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF): ",NL,TAB,TAB,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 "%d|%u , %d|%u",NL,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 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 printf5Str db "%x|%X , %x|%X",NL,EOS
@@ -206,9 +206,13 @@ _start:
lea rdi, [rel printf4Str] lea rdi, [rel printf4Str]
mov rsi, -50 mov rsi, -50
mov rdx, -50 mov rdx, -50
mov rcx, 0xFFFFFFFFFFFFFFFF mov rcx, -50
mov r8, 0xFFFFFFFFFFFFFFFF mov r8, 0xFFFFFFFFFFFFFFFF
mov r9, 0xFFFFFFFFFFFFFFFF
push 0xFFFFFFFFFFFFFFFF
sub rsp, SIZE_QWORD
call printf call printf
add rsp, SIZE_QWORD
; TEST 5 ; TEST 5
lea rdi, [rel printf5] lea rdi, [rel printf5]