Don't push/pop r11 in printf(), idk why I did that anymore but it's not needed
This commit is contained in:
@ -5,7 +5,7 @@ extern itoa
|
|||||||
|
|
||||||
section .rodata
|
section .rodata
|
||||||
NL db 0xA
|
NL db 0xA
|
||||||
bufferLength equ 4096
|
bufferLength equ 2
|
||||||
ERR_buffLen db "<!> ERROR: Failed to complete printf(), reached buffer length!",0xA,0x0
|
ERR_buffLen db "<!> ERROR: Failed to complete printf(), reached buffer length!",0xA,0x0
|
||||||
lERR_buffLen equ $-ERR_buffLen-1
|
lERR_buffLen equ $-ERR_buffLen-1
|
||||||
section .bss
|
section .bss
|
||||||
@ -217,13 +217,11 @@ printf:
|
|||||||
cmp r14, bufferLength-1
|
cmp r14, bufferLength-1
|
||||||
jl .final
|
jl .final
|
||||||
|
|
||||||
push r11
|
|
||||||
mov rax, NR_write
|
mov rax, NR_write
|
||||||
mov rdi, 2
|
mov rdi, 2
|
||||||
lea rsi, [rel ERR_buffLen]
|
lea rsi, [rel ERR_buffLen]
|
||||||
mov rdx, lERR_buffLen
|
mov rdx, lERR_buffLen
|
||||||
syscall
|
syscall
|
||||||
pop r11
|
|
||||||
|
|
||||||
.final:
|
.final:
|
||||||
pop r14
|
pop r14
|
||||||
|
Reference in New Issue
Block a user