printf: increase arg counter (r14) for invalid specifiers, as it's supposed to do (according to func doc)

This commit is contained in:
2025-07-15 08:55:37 +02:00
parent e593ce76d3
commit 920522e167
2 changed files with 2 additions and 1 deletions

View File

@@ -259,6 +259,7 @@ printf:
add rdi, 2
add r10, 2
add r11, 2
inc r14
jmp .process
;--- '%%' ---;

View File

@@ -98,7 +98,7 @@ section .rodata
printf11 db TAB,"printf(",DQUO,"%X | %8X | %08X\n",DQUO,", 0xAB0F, 0xBA0F, 0xAB0F): ",NL,TAB,TAB,EOS
printf11Str db "%X | %8X | %08X",NL,EOS
printf12 db TAB,"rax=0x1234567890ABCDEF",NL,TAB,"printf(",DQUO,"\nRAX\t%064b\nEAX\t\t\t\t\t%032b\n AX\t\t\t\t\t\t\t%016b\n AH\t\t\t\t\t\t\t%08b\t\n AL\t\t\t\t\t\t\t\t%08b\n",DQUO,", rax, eax, ax, ah, al): ",NL,TAB,TAB,EOS
printf12Str db "\nRAX\t%064b\nEAX\t\t\t\t\t%032b\n AX\t\t\t\t\t\t\t%016b\n AH\t\t\t\t\t\t\t%08b\t\n AL\t\t\t\t\t\t\t\t%08b\n",EOS
printf12Str db "\nRAX\t%0000064b\nEAX\t\t\t\t\t%032b\n AX\t\t\t\t\t\t\t%016b\n AH\t\t\t\t\t\t\t%08b\t\n AL\t\t\t\t\t\t\t\t%08b\n",EOS
printf13 db TAB,"printf(",DQUO,"%o | %8o | %08o\n",DQUO,", 1500, 1500, 1500): ",NL,TAB,TAB,EOS
printf13Str db "%o | %8o | %08o\n",EOS