Fixed read loop glitch

This commit is contained in:
2025-06-23 13:12:31 +03:00
parent 15311ca7d1
commit ceb84c9e3d
4 changed files with 20 additions and 3 deletions

15
main.s
View File

@@ -165,9 +165,22 @@ process_prnt:
ret
process_inpt:
# Gotta flush the buffer first
mov rdi, 1
mov rsi, r13
call write
# Clear Text buffer
mov rdi, r10
sub rdi, r13
mov rsi, rdi
mov rdi, r13
call clear_heap_block
mov r10, r13
# Ask character
mov rdi, r14
add rdi, r15
mov rsi, rdi # char*
xor rdi, rdi # fd
mov rdx, 1 # size