]> git.dujemihanovic.xyz Git - nameless-os.git/blob - kernel/kernel.c
More features in VGA driver
[nameless-os.git] / kernel / kernel.c
1 #include <tty.h>
2 #include <io.h>
3 #include <stdint.h>
4
5 const char *string = "Hello there!\n\n\
6 Hopefully your machine manages to print this text.\n\
7 If it did, that's great news because I managed to write a partial VGA driver.\n\n\
8 Right now, the short-term roadmap is as follows:\n\n\
9 * Complete the text-mode part of the VGA driver.\n\
10 * Enable interrupts using the PIC.\n\
11 * Write a driver for the Intel 8042 PS/2 controller so the OS can receive keystrokes.\n\
12 * Once all that is done, it would be desirable to start the switch to userspace so the OS can actually be remotely usable.\n\n\
13 Feel free to mess around with the code, although I doubt it will be very interesting at the moment.\n";
14
15 void _start(void)
16 {
17 screen_clear();
18 /*kprint(string, 0x07);*/
19 kprint("Color 0x01\n", VGA_COLOR_BLUE);
20 kprint("Color 0x02\n", VGA_COLOR_GREEN);
21 kprint("Color 0x03\n", VGA_COLOR_TEAL);
22 kprint("Color 0x04\n", VGA_COLOR_DARK_RED);
23 kprint("Color 0x05\n", VGA_COLOR_MAGENTA);
24 kprint("Color 0x06\n", VGA_COLOR_BROWN);
25 kprint("Color 0x07\n", VGA_COLOR_LIGHT_GRAY);
26 kprint("Color 0x08\n", VGA_COLOR_DARK_GRAY);
27 kprint("Color 0x09\n", VGA_COLOR_PURPLE);
28 kprint("Color 0x0A\n", VGA_COLOR_LIME);
29 kprint("Color 0x0B\n", VGA_COLOR_CYAN);
30 kprint("Color 0x0C\n", VGA_COLOR_BRIGHT_RED);
31 kprint("Color 0x0D\n", VGA_COLOR_PINK);
32 kprint("Color 0x0E\n", VGA_COLOR_YELLOW);
33 kprint("Color 0x0F\n", VGA_COLOR_WHITE);
34 kprintb(0xAE);
35 kprint("\n", 0);
36 kprintw(0xDEAD);
37 kprint("\n", 0);
38 kprintd(0x89ABCDEF);
39 }