summaryrefslogtreecommitdiff
path: root/src/kernel.c
diff options
context:
space:
mode:
authorSimponic <loganthebean222@gmail.com>2021-03-01 15:17:24 -0700
committerSimponic <loganthebean222@gmail.com>2021-03-01 15:17:24 -0700
commitc0c846cc15bbc4a14f705eeb923ed1024f4ee1a0 (patch)
tree9556cbe258bc72d263c33dc4d9876d4fb72402dc /src/kernel.c
parent09d1dcf3b115658283cb09a08986271398e8d8f8 (diff)
downloadsimponicOS-c0c846cc15bbc4a14f705eeb923ed1024f4ee1a0.tar.gz
simponicOS-c0c846cc15bbc4a14f705eeb923ed1024f4ee1a0.zip
Move to GitHub for flexing
Diffstat (limited to 'src/kernel.c')
-rw-r--r--src/kernel.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/kernel.c b/src/kernel.c
index d24c24e..653cd4e 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -1,22 +1,21 @@
#include "gdt.h"
+#include "idt.h"
+#include "isr.h"
#include "types.h"
#include "print.h"
+#include "port.h"
+
+// inline function to swap two numbers
#define FOREGROUND 0x0
#define BACKGROUND 0xF
-void PrintWithScreenFill(char* string, TextOutput* output_stream) {
- // Print a string and fill the screen
- print(string, BACKGROUND, FOREGROUND, output_stream);
- int row = output_stream->terminal_row;
- while (output_stream->terminal_row < output_stream->max_row) {
- putChar('\n', BACKGROUND, FOREGROUND, output_stream);
- }
- output_stream->terminal_row = row;
-}
-
void kernel_main(void) {
- TextOutput output_stream = createOutput(25,80,(uint16_t*)0xB8000);
- PrintWithScreenFill("Hello, Logan World!\n", &output_stream);
+ initializeGDT();
+ initializeIDT();
+ printToMonitor("Hello\n");
+ printIntToMonitor(10, 10);
+ asm ("int $0x3");
+ asm ("int $0x4");
}