A custom 32-bit operating system built from scratch in C and x86 Assembly, demonstrating low-level systems programming and OS development concepts.
- Custom Bootloader - Written in x86 Assembly, loads kernel into memory
- 32-bit Protected Mode - Full transition from Real Mode to Protected Mode
- GDT (Global Descriptor Table) - Proper memory segmentation setup
- IDT (Interrupt Descriptor Table) - 32 exception handlers + 16 IRQ handlers
- PIC (Programmable Interrupt Controller) - IRQ remapping to avoid conflicts
- Physical Memory Manager (PMM) - Bitmap-based page frame allocator
- Paging Support - 4KB page tables with identity mapping
- Dynamic Memory Allocation - Page-level memory allocation and deallocation
- VGA Text Mode Driver - 80x25 color text output with scrolling
- PS/2 Keyboard Driver - Scancode to ASCII conversion with shift/caps support
- PIT Timer - Programmable Interval Timer for time-based operations
- Interactive Shell - Command-line interface with multiple built-in commands
help- Display available commandsclear- Clear the screenversion- Show OS version informationmeminfo- Display memory statisticsecho- Echo text to screen
- In-Memory File System - Simple file creation, reading, and deletion
- Directory Support - Basic directory structure
CoreX OS
├── Bootloader (Assembly)
│ ├── Stage 1: Boot sector (512 bytes)
│ └── Stage 2: Kernel loader
├── Kernel (C + Assembly)
│ ├── Core
│ │ ├── Entry point (kernel_stub.asm)
│ │ ├── Main kernel (kernel.c)
│ │ └── Interrupt handlers (isr.asm)
│ ├── Memory Management
│ │ ├── PMM (pmm.c)
│ │ └── Paging (paging.c)
│ ├── Drivers
│ │ ├── VGA (kernel.c)
│ │ ├── Keyboard (keyboard.c)
│ │ └── Timer (timer.c)
│ └── System
│ ├── IDT (idt.c)
│ ├── PIC (pic.c)
│ ├── Shell (shell.c)
│ └── File System (fs.c)
- NASM - Netwide Assembler
- GCC - GNU Compiler Collection (with
-m32support) - LD - GNU Linker
- QEMU - For testing (qemu-system-i386)
# Build bootloader
nasm -f bin bootloader/boot.asm -o bootloader/boot.bin
# Build kernel
nasm -f elf32 kernel/kernel_stub.asm -o kernel/kernel_stub.o
nasm -f elf32 kernel/isr.asm -o kernel/isr.o
gcc -m32 -ffreestanding -c kernel/*.c -Iinclude
ld -m i386pe -T kernel/linker.ld -o kernel/kernel.bin <objects>
# Create OS image
cat bootloader/boot.bin kernel/kernel.bin > os-image.bin
# Run in QEMU
qemu-system-i386 -drive format=raw,file=os-image.binOr use the provided Makefile:
make all
make run- Direct hardware manipulation via port I/O
- Inline assembly for critical operations
- Manual stack and register management
- Interrupt handling in Assembly
- Bootloader development and disk I/O
- CPU mode transitions (Real → Protected)
- Memory segmentation and paging
- Interrupt-driven I/O
- Device driver development
- Modular architecture with clear separation of concerns
- Comprehensive comments and documentation
- Proper error handling
- Clean code structure following OS development best practices
This project demonstrates proficiency in:
- Low-level programming (C, x86 Assembly)
- Operating system concepts (memory management, process scheduling, I/O)
- Hardware interaction (BIOS, VGA, keyboard, timer)
- Systems architecture (x86 architecture, interrupts, paging)
- Debugging (QEMU, GDB, serial debugging)
Working:
- ✅ Bootloader successfully loads kernel
- ✅ Protected mode transition
- ✅ IDT with exception and IRQ handlers
- ✅ VGA text output with scrolling
- ✅ Physical memory manager
- ✅ Shell command system
- ✅ File system operations
In Development:
- 🔨 Interactive keyboard input (hardware interrupt handling)
- 🔨 Multi-tasking scheduler
- 🔨 Virtual file system
- 🔨 Network stack
CoreX OS booting and initializing subsystems
Interactive shell with command support
This project was built as a learning exercise to understand:
- How operating systems work at the lowest level
- The boot process from power-on to running code
- Memory management and virtual memory
- Hardware abstraction and device drivers
- System call interfaces
- OSDev Wiki
- Intel x86 Architecture Manuals
- "Operating Systems: Three Easy Pieces" by Remzi H. Arpaci-Dusseau
- Various OS development tutorials and documentation
This project is open source and available under the MIT License.
Your Name
- GitHub: Shashank0701-byte
- LinkedIn: Shashank_Chakraborty
Built with ❤️ and lots of debugging