void print_logo(void) {
print("\n");
print(" █████╗ ███╗ ██╗███╗ ██╗ ██████╗ ████████╗ █████╗ ████████╗ ██████╗ ███████╗\n");
print(" ██╔══██╗████╗ ██║████╗ ██║██╔═══██╗╚══██╔══╝██╔══██╗╚══██╔══╝██╔═══██╗██╔════╝\n");
print(" ███████║██╔██╗ ██║██╔██╗ ██║██║ ██║ ██║ ███████║ ██║ ██║ ██║███████╗\n");
print(" ██╔══██║██║╚██╗██║██║╚██╗██║██║ ██║ ██║ ██╔══██║ ██║ ██║ ██║╚════██║\n");
print(" ██║ ██║██║ ╚████║██║ ╚████║╚██████╔╝ ██║ ██║ ██║ ██║ ╚██████╔╝███████║\n");
print(" ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝\n");
print("\n");
}A minimal, functional operating system for learning OS development.
- Boots from disk (BIOS/MBR)
- Loads kernel safely with error handling
- Displays ASCII logo
- Interactive shell with keyboard input
- Clean, organized code structure
- Fully commented for learning
- Safe to experiment with
# Build
make
# Run in QEMU
make run- Bootloader messages
- Kernel loading
- ASCII AnnotatOS logo
- Welcome message
- Available commands
- Interactive command prompt
AnnotatOS/
├── boot/ # Bootloader
├── kernel/ # Kernel code
├── build/ # Build outputs
├── docs/ # Documentation
└── Makefile # Build system
See docs/STRUCTURE.md for detailed structure explanation.
docs/STRUCTURE.md- Project organization and build processdocs/SAFETY.md- Safety information and troubleshootingdocs/README.md- This file
- NASM (assembler)
- GCC (C compiler)
- Make
- QEMU (for testing)
sudo pacman -S nasm gcc make qemu-system-x86sudo apt install nasm gcc make qemu-system-x86make # Build OS image
make run # Build and run in QEMU
make clean # Remove build files
make help # Show all targets-
Understand the structure
- Read
docs/STRUCTURE.md - See how files are organized
- Understand the build flow
- Read
-
Read the bootloader
- Open
boot/boot.asm - Read every comment
- Understand boot process
- Open
-
Read the kernel
- Open
kernel/kernel_entry.asm - Open
kernel/kernel.c - See how assembly calls C
- Open
-
Make small changes
- Modify the ASCII logo
- Change welcome message
- Add print statements
-
Rebuild and test
- Run
make clean && make run - See your changes
- Run
This OS is completely safe:
- Only runs in QEMU virtual machine
- Cannot damage your computer
- Proper error handling prevents boot loops
- Read
docs/SAFETY.mdfor details
This is a minimal educational kernel:
- No Protected Mode (16-bit only for simplicity)
- No interrupts/drivers (keyboard uses polling)
- Shell supports basic built-in commands only
These are intentional to keep code simple and educational.
After understanding this minimal version:
- Add command history
- Add Protected Mode
- Add interrupt handling
- Add more drivers
make clean
make- Check error message
- Bootloader likely couldn't load kernel
- Rebuild:
make clean && make
- Check
build/boot.binis 512 bytes - Check
build/os.imgexists
See docs/SAFETY.md for more troubleshooting.
- First 512 bytes loaded by BIOS
- Loads kernel from disk
- Error handling
- Jumps to kernel
- Kernel entry point
- Sets up environment
- Calls C code
- Main kernel logic
- Screen output
- ASCII logo
- Interactive shell
- Builds everything
- Creates bootable image
- Runs in QEMU
- BIOS loads
boot/boot.asmto memory 0x7C00 - Bootloader loads
kernel/*.{asm,c}from disk - Bootloader jumps to kernel
- Kernel displays logo and messages
- System accepts interactive shell commands
- User can clear screen or exit QEMU
This is an educational project. Feel free to:
- Experiment with the code
- Add features
- Improve documentation
- Share your modifications
- OSDev Wiki: https://wiki.osdev.org/
- Intel Manuals: https://www.intel.com/sdm
- NASM Docs: https://www.nasm.us/docs.php
Educational use. Learn from it, modify it, share it.
This OS is designed for learning. Every line is commented. Every decision is explained. Start simple, build up gradually.
The goal is understanding, not features.
Have fun learning OS development!