Fix tests for printf %p: Don't use random magic number but actual pointers, since that's what %p is for)
This commit is contained in:
@@ -101,7 +101,7 @@ section .rodata
|
||||
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
|
||||
printf14Str db "%#b | %#08b | %#x | %#8X | %#o\n",EOS
|
||||
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %08p | %#08p\n",DQUO,", 0xabc, 0xabc, 0xabc, 0xabc, 0xabc): ",NL,TAB,TAB,EOS
|
||||
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %08p | %#08p\n",DQUO,", str5, str5, str5, strBuff1, strBuff1): ",NL,TAB,TAB,EOS
|
||||
printf15Str db "%p | %#p | %8p | %08p | %#08p\n",EOS
|
||||
; strlen()
|
||||
msgStrlen db NL,"TEST strlen()",NL,EOS
|
||||
@@ -402,11 +402,11 @@ _start:
|
||||
lea rdi, [rel printf15]
|
||||
call print
|
||||
lea rdi, [rel printf15Str]
|
||||
mov rsi, 0xabc
|
||||
mov rdx, 0xabc
|
||||
mov rcx, 0xabc
|
||||
mov r8, 0xabc
|
||||
mov r9, 0xabc
|
||||
lea rsi, [rel str5]
|
||||
lea rdx, [rel str5]
|
||||
lea rcx, [rel str5]
|
||||
lea r8, [rel strBuff1]
|
||||
lea r9, [rel strBuff1]
|
||||
call printf
|
||||
%endif
|
||||
|
||||
|
Reference in New Issue
Block a user