-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel.c
More file actions
23 lines (20 loc) · 771 Bytes
/
Copy pathkernel.c
File metadata and controls
23 lines (20 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#define VGABUF 0xb8000
#define HEIGHT 80
#define WIDTH 80 // default for qemu. probably shouldn't be hardcoded but it is so suck it. // coming back later and reading the comments I wrote at 3 am is fun
#define NMI_disable_bit 1
#include "io.h"
#include "cli.h"
void main() {
while (1) {
print("kernel loaded!", 0, 0);
//outb (0x70, (NMI_disable_bit << 7) | (0x00)); // set cmos (port 0x70) register to seconds (register 0x00)
printSquare(6,6,11,4);
print("Welcome to", 7, 7);
print("iinob OS!", 7, 9);
//unsigned char rawSecond = inb(0x71); // read data from port 0x71 (cmos register value)
//unsigned int second = ((rawSecond >> 4) * 10) + (rawSecond & 0x0F);
//printNum(getSecond(), 0, 2); // cast to char and print probably hopefully
shell();
}
return;
}