diff --git a/README.md b/README.md index 0812f44..fbe727d 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,9 @@ Idk why i called it that it was 3am and i needed sleep ## About Kern is a 32-bit OS based on the x86 architecture written in NASM Assembly and C. +I'm working on a basic command line as well as a custom filesystem (filetable for now). -It supports a basic command line and has a custom filesystem. - -_Note: The filesystem is currently a basic filetable._ +_Since 32-bit switch, a lot of features have been removed because they were dependent on BIOS interrupts_ ## Usage If you want to try kern for some reason, you can. @@ -16,22 +15,26 @@ You might be able to find some releases, or build it using the build.sh script. For building, you'll need these tools: - [NASM](https://www.nasm.us/) +- [GCC](https://gcc.gnu.org/) on linux +- A cross compiler on mac (installation `$ brew tap nativeos/i386-elf-toolchain && brew install i386-elf-binutils i386-elf-gcc`) - [QEMU](https://www.qemu.org/) (for emulation) +Then just run `./build.sh` and it should build and run qemu. + I personally wouldn't recommend running this on real hardware, because it's untested and will just probably break you pc, but if you really want to, you can try it, but don't blame me if something goes wrong. If you don't know how to do something, try the 'help' command! ## Some images -The command prompt: \ -![CLI image](other/example.png) +Text editor **concept**: \ +![Vim like editor](other/editor.png) -Built-in code editor: \ -![Code Editor](other/editor.png) +Available character set: \ +![IBM VGA 8x16 Character set](other/charset.png) -Graphics mode test: \ -![Graphics Test](other/graphics.png) +Available colors: \ +![16 VGA Colors](other/colors.png) _These images may be outdated, Idk_ diff --git a/other/._charset.png b/other/._charset.png new file mode 100644 index 0000000..243cf93 Binary files /dev/null and b/other/._charset.png differ diff --git a/other/._colors.png b/other/._colors.png new file mode 100644 index 0000000..3cf4635 Binary files /dev/null and b/other/._colors.png differ diff --git a/other/._editor.png b/other/._editor.png new file mode 100644 index 0000000..29e27d4 Binary files /dev/null and b/other/._editor.png differ diff --git a/other/charset.png b/other/charset.png index d506abe..50f49d9 100644 Binary files a/other/charset.png and b/other/charset.png differ diff --git a/other/colors.png b/other/colors.png new file mode 100644 index 0000000..ea50634 Binary files /dev/null and b/other/colors.png differ diff --git a/other/editor.png b/other/editor.png index d092915..1cb60f1 100644 Binary files a/other/editor.png and b/other/editor.png differ diff --git a/other/example.png b/other/example.png deleted file mode 100644 index bde5066..0000000 Binary files a/other/example.png and /dev/null differ diff --git a/other/graphics.png b/other/graphics.png deleted file mode 100644 index ddbf80b..0000000 Binary files a/other/graphics.png and /dev/null differ diff --git a/other/logo.png b/other/logo.png deleted file mode 100644 index 53ffc6e..0000000 Binary files a/other/logo.png and /dev/null differ diff --git a/src/kernel/main.c b/src/kernel/main.c index f5dde2f..d4dae1e 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -4,11 +4,12 @@ #include "irq.h" void main() { + // Interrupts setupIdt(); setupIsrs(); setupIrqs(); clear(0x0f); - print("kern.\n\n", 0x0f); + print("kern.\n", 0x0f); } diff --git a/src/kernel/screen.c b/src/kernel/screen.c index c24c9e9..095df7a 100644 --- a/src/kernel/screen.c +++ b/src/kernel/screen.c @@ -51,13 +51,12 @@ void clear(uint8_t attr) { } void printHex(uint8_t d, uint8_t attr) { - char digits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - + char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; uint8_t low = d & 0x0f; uint8_t high = (d & 0xf0) >> 4; - putc(digits[low], attr); - putc(digits[high], attr); + putc(hexDigits[low], attr); + putc(hexDigits[high], attr); } void setCursorPos(uint16_t offset) {