From a1de326ac5d89cbf9555c9a0a9a662af35c6dcf7 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 15 Jun 2023 22:58:30 +0100 Subject: Implement a countdown clock in the timer Updated the HUD to show the time. --- src/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 306f5f1..0711cf9 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,7 @@ #include #include +#include "timer.h" #include "keyb.h" #include "vga.h" #include "data.h" @@ -12,10 +13,17 @@ /* disable paging because our int handlers are written in C */ int _crt0_startup_flags = _CRT0_FLAG_LOCK_MEMORY; +void free_all() +{ + timer_free(); + keyb_free(); +} + int main(int argc, char *argv[]) { + timer_init(); keyb_init(); - atexit(keyb_free); + atexit(free_all); /* set VGA 320x200, 256 col */ if (!set_mode(0x13)) -- cgit v1.2.3