×
Custom x86 Operating System
A fully custom operating system built from scratch with x86 assembly and C, featuring memory management,
hardware abstraction, and graphics capabilities.
Core Architecture
- Custom bootloader in x86 assembly
- Protected mode with GDT setup
- Paging with 4KB pages
- Interrupt handling with IDT
Graphics & UI
- VESA graphics initialization
- Linear framebuffer rendering
- BMP image loading
- Alpha-blended cursor
Storage & Filesystem
- FAT16/32 filesystem support
- Directory listing
- File reading
- Cluster chain traversal
Input & Hardware
- PS/2 keyboard driver
- PS/2 mouse driver
- PIC controller remapping
- Serial port communication
View Bootloader Code Snippet
; Bootloader Assembly Excerpt
[BITS 16]
[ORG 0x7C00]
_start:
cli
xor ax, ax
mov ds, ax
mov es, ax
mov ss, ax
mov sp, 0x7C00
; Load kernel from disk
mov si, msg_loading
call print
call load_kernel
; Enable A20 line
call enable_a20
; Set up VESA graphics
call set_vesa_mode
; Enter protected mode
lgdt [gdt_descriptor]
mov eax, cr0
or eax, 1
mov cr0, eax
jmp CODE_SEG:protected_mode
enable_a20:
; ... A20 enabling code ...
ret
set_vesa_mode:
; ... VESA initialization ...
ret
[BITS 32]
protected_mode:
mov ax, DATA_SEG
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 0x010000
jmp CODE_SEG:0x10000 ; Jump to kernel