Added Real Time Clock. Time is now being shown at the top

This commit is contained in:
2024-05-08 16:54:25 +02:00
parent a97ac11d70
commit daa6d35045
5 changed files with 167 additions and 12 deletions
+4 -1
View File
@@ -10,6 +10,7 @@
#include <screen/graphics.h>
#include <keyboard/keyboard.h>
#include <interrupt/pit.h>
#include <interrupt/rtc.h>
#include <time.h>
#define PROMPT "#> "
@@ -39,7 +40,7 @@ void main() {
deinitMemoryRegion(memmapAddr, maxBlocks / BLOCKS_PER_BYTE);
// TODO: Find font in filetable
diskRead(36, 4, font); // Read font from disk
diskRead(46, 4, font); // Read font from disk
clear();
print("kern.\n\n");
@@ -52,9 +53,11 @@ void main() {
idtSetGate(0x80, syscallHandler, USR_INT_GAME_FLAGS); // Setup Syscall handler in IDT for int 0x80
disableIrqs();
remapPic();
unsetIrqMask(2); // Enable PIC 2 line
__asm__ volatile ("sti");
setupTimer();
setupRtc();
setupKeyboard();
// Run Interactive Shell Program