Add printf() comment, return length of printed message
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user