diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-04 13:40:40 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-04 13:40:40 +0100 |
commit | 71e63d03f95d559c709911844ef1fc9907c74f49 (patch) | |
tree | 79d512661d9a4b646c4771178ff16caf13827f57 /kernel/tty.c | |
parent | 0fc6d68615c4921bbe73ee415ef06a921ff666e2 (diff) | |
download | jeyzuos-71e63d03f95d559c709911844ef1fc9907c74f49.zip jeyzuos-71e63d03f95d559c709911844ef1fc9907c74f49.tar.gz |
tty: putc support '\n'
Diffstat (limited to 'kernel/tty.c')
-rw-r--r-- | kernel/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/tty.c b/kernel/tty.c index 628a21e..5de2f3b 100644 --- a/kernel/tty.c +++ b/kernel/tty.c @@ -56,14 +56,14 @@ void tty_putc(char c) if (c == '\n') { tty_col = 0; - tty_row++; + if (++tty_row == VGA_HEIGHT) + tty_row = 0; } else { tty_putc_at(c, tty_color, tty_col, tty_row); if (++tty_col == VGA_WIDTH) { tty_col = 0; - if (++tty_row == VGA_HEIGHT) { + if (++tty_row == VGA_HEIGHT) tty_row = 0; - } } } } |