diff options
Diffstat (limited to 'kernel/con.c')
| -rw-r--r-- | kernel/con.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/con.c b/kernel/con.c index 3b48de1..69c34e1 100644 --- a/kernel/con.c +++ b/kernel/con.c @@ -43,8 +43,8 @@ static void scroll_up(void) { cursorpos(pos); } -/* must be called before any console output */ -void con_init(void) { +/* clear the console and reset the cursor to the starting position */ +void con_clear(void) { int n = COLS * ROWS; uint8_t *p = vram; @@ -57,6 +57,12 @@ void con_init(void) { cursorpos(0); } +/* must be called before any console output */ +void con_init(void) { + /* clear the console */ + con_clear(); +} + /* write a zero-terminated string to console */ int puts(char *s) { uint8_t *p = &vram[pos]; |
