This is a practical guide to creating your own x86 operating system. It offers detailed chapters on setting up a development environment, writing to screen and serial port, segmentation, interrupts, input, memory allocation, virtual memory through paging, and system calls. Developed in six weeks, this book encourages incremental development and pair-programming. While suitable for those comfortable with UNIX/Linux, C programming, and hexadecimal notation, search engines and other tutorials can assist beginners. Using NASM, the C programming language, and Bochs emulator, this book guides you through creating a simple OS kernel capable of writing 0xCAFEBABE to the eax register. A detailed example on linking and booting is provided using GRUB Legacy, allowing testing in a virtual machine environment before moving to physical hardware.
https://littleosbook.github.io/