Quellcode durchsuchen

stdio: fix broken ReadC logic

Looping inside ReadC broke the shell's hook logic. We have to
return immediately when nothing is typed.
pull/10/head
Virgil Dupras vor 5 Jahren
Ursprung
Commit
23354eba94
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. +4
    -1
      kernel/stdio.asm

+ 4
- 1
kernel/stdio.asm Datei anzeigen

@@ -112,11 +112,14 @@ printHexPair:
;
; This routine also takes care of echoing received characters back to the TTY.
;
; This routine doesn't wait after a typed char. If nothing is typed, we return
; immediately with Z flag unset.
;
; Note that this routine doesn't bother returning the typed character.
stdioReadC:
; Let's wait until something is typed.
call stdioGetC
jr nz, stdioReadC ; nothing typed? loop
ret nz ; nothing typed? nothing to do
; got it. Now, is it a CR or LF?
cp ASCII_CR
jr z, .complete ; char is CR? buffer complete!


Laden…
Abbrechen
Speichern