forked from PoliEcho-holding-org/kern
Added Real Time Clock. Time is now being shown at the top
This commit is contained in:
+5
-5
@@ -12,11 +12,11 @@
|
||||
filetable:
|
||||
db "boot",0,0,0,0,0,0, "bin",0,0,5
|
||||
db "filetable",0, "tab",0,5,1
|
||||
db "kernel",0,0,0,0, "bin",0,6,30
|
||||
db "term16n",0,0,0, "fnt",0,36,4
|
||||
db "testfont",0,0, "fnt",0,40,4
|
||||
db "test",0,0,0,0,0,0, "txt",0,44,1
|
||||
db "calc",0,0,0,0,0,0, "bin",0,45,2
|
||||
db "kernel",0,0,0,0, "bin",0,6,40
|
||||
db "term16n",0,0,0, "fnt",0,46,4
|
||||
db "testfont",0,0, "fnt",0,50,4
|
||||
db "test",0,0,0,0,0,0, "txt",0,54,1
|
||||
db "calc",0,0,0,0,0,0, "bin",0,55,2
|
||||
|
||||
times 512-($-$$) db 0
|
||||
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
%define VIDMEM 0xb800
|
||||
%define FILETAB_LOC 0x7000 ; TODO: Read kernel size and location from ft
|
||||
%define KERNEL_SIZE 30 ; 15kB
|
||||
%define KERNEL_SIZE 40 ; 20kB
|
||||
|
||||
start:
|
||||
mov [driveNum], dl ; Store the drive number
|
||||
|
||||
Reference in New Issue
Block a user