From 9130122609599f14f30fd6d2b32d15865cc8dfe3 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 23 Dec 2021 07:32:54 -0800 Subject: Moving away from UART output --- src/sys/timer.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/sys/timer.c') diff --git a/src/sys/timer.c b/src/sys/timer.c index ca3366c..ff55bd4 100644 --- a/src/sys/timer.c +++ b/src/sys/timer.c @@ -1,3 +1,4 @@ +#include "../graphics/drawer.h" #include "../sys/core.h" #include "../sys/timer.h" #include "../util/time.h" @@ -22,21 +23,19 @@ void c_timer() { //uart_hexn(v); // Lock the execution counter + unsigned int x = g_Drawer.x; + unsigned int y = g_Drawer.y; + g_Drawer.x = 0; + g_Drawer.y = 0; if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) { *(exe_cnt_m.addr) += 1; -#ifndef NOANSI - uart_string("\033[?25l\033[s\033[1;1H\033[91mDendritOS \033[96mv"); -#else - uart_string("\033[?25l\033[1;1H\033[91mDendritOS \033[96mv"); -#endif - uart_string(os_info_v); - uart_string("\033[0m #"); - uart_10(*(exe_cnt_m.addr)); -#ifndef NOANSI - uart_string("\033[u\033[?25h"); -#else - uart_string("\033[8;1H\033[?25h> "); -#endif + write_cstring(&g_Drawer, "DendritOS", 0xDF0000); + write_cstring(&g_Drawer, " v", 0x00DF00); + write_cstring(&g_Drawer, os_info_v, 0x00DF00); + write_string(&g_Drawer, " #"); + write_10(&g_Drawer, *(exe_cnt_m.addr)); release_mutex(&exe_cnt_m, SCHED_PID); } + g_Drawer.x = x; + g_Drawer.y = y; } -- cgit v1.2.1