Back

I made a working OS in C and Assembly


Languages

C94.3%
Makefile2.9%
Assembly2.6%
Linker Script0.2%

I made a fully working OS in C and Assembly as a fun project to learn more about low-level programming and how operating systems work! This experience allowed me to understand the fundamentals of computer architecture, memory management (mm), and how software interacts with hardware.

First, I started by learning the basics of C programming, which is essential for OS development. I also learned Assembly language to write low-level code that interacts directly with the hardware. For Sunset (the name of the OS), I used a existing base kernel and built upon it, adding features such as file system support, process management and a simple shell UI.

Starting from a already existing basic kernel, I implemented and integrated several core OS components, including memory management with paging, interrupt handling (GDT, IDT, ISR, IRQ), process management and context switching, a custom file system layer, IDE disk support, and a command-line shell. I also developed a graphical subsystem using VBE framebuffer graphics, along with mouse support and a simple GUI framework.

Regarding the tools I used, I relied on QEMU mainly for emulation and testing, a gcc cross-compiler targeting 32-bit x86 ELF. I also used NASM for assembling my Assembly code and GDB for debugging, GRUB as the bootloader, and Git for version control!

Overall, I got a deeper understanding of how operating systems work, how software interacts with hardware, and the challenges involved in low-level programming - it was a great learning experience. If you wish to learn more about this kind of development, check out the OSDev wiki and the source code of Sunset.

Thanks for stopping by and reading about my experience creating an OS. I hope it inspired you to learn more about low-level programming and OS development! BTW, I wanna clarify that Sunset is a hobby project and is not intended for actual use, it was built purely for educational purposes and, well, fun!