Added read_line console function #10

Merged
ShatteredMINT merged 9 commits from Micha_i/symphony_stdlib:console-functions into main 2026-09-03 14:56:16 +02:00
Showing only changes of commit 65caf8aff9 - Show all commits
+5 -4
View File
@@ -1,10 +1,11 @@
; Reads a line from the keyboard and fills the specified buffer with it ; Reads a line from the keyboard and fills the specified buffer with it
; Does not support Shift or any other special keys ; Does not support Shift or any other special keys
; Argument: r1 - pointer to the buffer ; Arguments:
; Returns the pointer to the same buffer ; r1 - pointer to the buffer
; Clobbers r2, r3 and r4 ; Result:
; r1 - pointer to the same buffer
; Clobbers: r2, r3, r4
pub read_line: pub read_line:
mov r4, 0 ; Storing the last key here, so we don't repeat the same key mov r4, 0 ; Storing the last key here, so we don't repeat the same key
mov r3, r1 ; The pointer to after the last character mov r3, r1 ; The pointer to after the last character