Add printf() comment, return length of printed message

This commit is contained in:
2025-06-25 13:56:30 +02:00
parent d0769f6ffc
commit 1e095bec77
2 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,8 @@ puts:
leave
ret
;----- printf(const char* string, ...) -----;
; Currently only supports specifiers: %d, %c, %s
; Return value: Amount of printed characters
printf:
push rbp
mov rbp, rsp
@ -213,6 +215,8 @@ printf:
mov byte [r11], 0x0
lea rdi, [rel printfBuff]
call print
lea rdi, [rel printfBuff]
call strlen
pop r13
pop r12