utoa/printf: Support octal (%o)
This commit is contained in:
@@ -246,6 +246,8 @@ printf:
|
||||
je .rep_x
|
||||
cmp byte [rdi + 1], 'b'
|
||||
je .rep_b
|
||||
cmp byte [rdi + 1], 'o'
|
||||
je .rep_o
|
||||
cmp byte [rdi + 1], 's'
|
||||
je .rep_s
|
||||
|
||||
@@ -323,6 +325,20 @@ printf:
|
||||
pop_regs
|
||||
jmp .insertString
|
||||
|
||||
;--- '%o' ---;
|
||||
.rep_o:
|
||||
load_arg rsi
|
||||
push_regs
|
||||
mov rdi, rsi
|
||||
mov rsi, 8
|
||||
mov rdx, r12
|
||||
mov rcx, r13
|
||||
mov r8, 0
|
||||
call utoa
|
||||
mov rsi, rax
|
||||
pop_regs
|
||||
jmp .insertString
|
||||
|
||||
;--- '%s' ---;
|
||||
.rep_s:
|
||||
load_arg rsi
|
||||
|
Reference in New Issue
Block a user