atoi(): Add support for lowercase hexadecimal letters

This commit is contained in:
2025-07-20 12:18:29 +02:00
parent 318ccc960f
commit b0e9193b0a
2 changed files with 23 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ section .rodata
; atoi()
msgAtoi db NL,"TEST atoi()",NL,EOS
atoiOutput db TAB,"%s = %d",NL,EOS
atoiOutput db TAB,"atoi(",DQUO,"%s",DQUO,"): %d",NL,EOS
atoi1 db "1234567890",EOS
atoi2 db "0xFFFFFFFF",EOS ;4 294 967 295
atoi3 db "0o776655",EOS ;261 549
@@ -218,6 +218,7 @@ section .rodata
atoi8 db "0x0962GBCDEF",EOS ;0
atoi9 db "0o77865",EOS ;0
atoi10 db "0b102001",EOS;0
atoi11 db "0xffffffff",EOS ;4 294 967 295
section .data
section .bss
@@ -1105,6 +1106,7 @@ _start:
testatoi atoi8
testatoi atoi9
testatoi atoi10
testatoi atoi11
%endif
;---