summaryrefslogtreecommitdiff
path: root/kernel/con.c
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-06-19 05:22:54 +1000
committerJake Mannens <jake72360@gmail.com>2018-06-19 05:22:54 +1000
commitf6858b7333139441215e83e070e098bf09056762 (patch)
tree65b7ad0680174bc5331a5db8505be4213e6cc736 /kernel/con.c
parent627d2d0c0ee5147f53fdba8fc1f9108f8edeb8f3 (diff)
Added foundation code to initialize the PIT and create a 10ms jiffies
counter.
Diffstat (limited to 'kernel/con.c')
-rw-r--r--kernel/con.c10
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];