From f6858b7333139441215e83e070e098bf09056762 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Tue, 19 Jun 2018 05:22:54 +1000 Subject: Added foundation code to initialize the PIT and create a 10ms jiffies counter. --- kernel/con.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'kernel/con.c') 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]; -- cgit v1.3