Adds int2str() and uint2str() (=>itoa)

This commit is contained in:
2025-07-08 17:12:33 +02:00
parent 4e7f086bff
commit 72409116f5
2 changed files with 118 additions and 6 deletions

View File

@@ -12,15 +12,18 @@ extern strcpy
extern strcat
extern strclr
; convert.asm
extern int2str
extern uint2str
section .rodata
TEST_print equ 0
TEST_puts equ 0
TEST_print equ 1
TEST_puts equ 1
TEST_int2str equ 1 ;includes uint2str
TEST_printf equ 1
TEST_strlen equ 0
TEST_strcpy equ 0
TEST_strcat equ 0
TEST_strclr equ 0
TEST_strlen equ 1
TEST_strcpy equ 1
TEST_strcat equ 1
TEST_strclr equ 1
str1 db "Hello, world!",EOS
str2 db "Hello, World!",EOS
@@ -105,6 +108,17 @@ _start:
call puts
%endif
;---
;--- int2str() / uint2str()
;---
%if TEST_int2str
; x/s $rax after calls to confirm proper output
mov rdi, -569384
call int2str
mov rdi, -569384
call uint2str
%endif
;---
;--- printf()
;---