Extra test for %p (or rather prefix+padding): prefix taken into account for padding spaces but not for zeroes.
This commit is contained in:
@@ -101,8 +101,8 @@ section .rodata
|
|||||||
printf13Str db "%o | %8o | %08o\n",EOS
|
printf13Str db "%o | %8o | %08o\n",EOS
|
||||||
printf14 db TAB,"printf(",DQUO,"%#b | %#08b | %#x | %#8X | %#o\n",DQUO,", 8, 8, 0xABCDEF, 0x12345678, 15): ",NL,TAB,TAB,EOS
|
printf14 db TAB,"printf(",DQUO,"%#b | %#08b | %#x | %#8X | %#o\n",DQUO,", 8, 8, 0xABCDEF, 0x12345678, 15): ",NL,TAB,TAB,EOS
|
||||||
printf14Str db "%#b | %#08b | %#x | %#8X | %#o\n",EOS
|
printf14Str db "%#b | %#08b | %#x | %#8X | %#o\n",EOS
|
||||||
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %08p | %#08p\n",DQUO,", str5, str5, str5, strBuff1, strBuff1): ",NL,TAB,TAB,EOS
|
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %#8p | %08p | %#08p\n",DQUO,", str5, str5, str5, str5, strBuff1, strBuff1): ",NL,TAB,TAB,EOS
|
||||||
printf15Str db "%p | %#p | %8p | %08p | %#08p\n",EOS
|
printf15Str db "%p | %#p | %8p | %#8p | %08p | %#08p\n",EOS
|
||||||
; strlen()
|
; strlen()
|
||||||
msgStrlen db NL,"TEST strlen()",NL,EOS
|
msgStrlen db NL,"TEST strlen()",NL,EOS
|
||||||
strlen1 db TAB,"strlen(str1): %d",NL,EOS
|
strlen1 db TAB,"strlen(str1): %d",NL,EOS
|
||||||
@@ -405,9 +405,12 @@ _start:
|
|||||||
lea rsi, [rel str5]
|
lea rsi, [rel str5]
|
||||||
lea rdx, [rel str5]
|
lea rdx, [rel str5]
|
||||||
lea rcx, [rel str5]
|
lea rcx, [rel str5]
|
||||||
lea r8, [rel strBuff1]
|
lea r8, [rel str5]
|
||||||
lea r9, [rel strBuff1]
|
lea r9, [rel strBuff1]
|
||||||
|
sub rsp, SIZE_QWORD
|
||||||
|
push strBuff1
|
||||||
call printf
|
call printf
|
||||||
|
add rsp, SIZE_QWORD * 2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
;---
|
;---
|
||||||
|
Reference in New Issue
Block a user