Proyek pengembangan sistem operasi minimal 16-bit x86 yang ditulis dalam C dan Assembly.
Ini adalah sistem operasi bootable yang masih dalam tahap pengembangan, berjalan di real mode (16-bit) dengan rencana transisi ke protected mode (32-bit). Saat ini fokus pada implementasi fungsi inti sistem dan interfacing hardware.
- Bootloader (boot sector 512-byte)
- Multi-sector loading (pengalamatan LBA)
- Driver VGA text mode (akses langsung ke buffer 0xB8000)
- Keyboard input handling (translasi scancode)
- Driver PIT (Programmable Interval Timer)
- Operasi I/O port (instruksi in/out)
- Interface shell dasar dengan command parsing
- Manajemen cursor (VGA hardware cursor)
- Screen scrolling
- Rendering teks berwarna
- Inisialisasi GDT (Global Descriptor Table)
- Aktivasi A20 line (untuk akses memori >1MB)
- Switching ke protected mode (transisi 16-bit ke 32-bit)
- Setup IDT (Interrupt Descriptor Table)
- IRQ handling di protected mode
- Memory management (paging/segmentation)
- Dukungan filesystem (FAT12/FAT16)
- Driver disk I/O (ATA/IDE)
- Hapus dependensi BIOS INT
- Dukungan user mode
- System calls dasar
- Process/task switching
- Higher half kernel
nasm- Netwide Assembler untuk bootloaderi386-elf-gcc- Cross-compiler untuk target x86i386-elf-ld- Linker untuk objek ELFi386-elf-objcopy- Konverter object filedd- Data duplicator (standar di sistem Unix)make- Build automation
- CPU kompatibel x86 (hardware asli atau emulator)
- Floppy disk drive 1.44MB (atau emulasi)
- Display kompatibel VGA
- Keyboard PS/2
- QEMU (
qemu-system-i386) - Bochs (untuk debugging)
- VirtualBox/VMware (untuk testing di hardware)
make buildProses ini akan:
- Kompilasi file C source ke object code 16-bit
- Assembly bootloader dan file assembly tambahan
- Link semua object menjadi satu ELF executable
- Konversi ELF ke raw binary
- Buat floppy disk image 1.44MB
- Tulis bootloader ke sektor pertama
- Tulis kernel ke sektor berikutnya
make runqemu-system-i386 -fda os.img -boot abochs -f bochsrc -qTulis image ke USB/floppy:
sudo dd if=os.img of=/dev/sdX bs=512.
├── src/
│ ├── bootsector.s # Boot sector (stage 1)
│ ├── sector-lba2.c # Main kernel entry
│ ├── igdt_loader.c # GDT loader (WIP)
│ └── gdt_loader.asm # Assembly GDT routines (WIP)
├── include/
│ ├── pit_channel.h # PIT timer definitions
│ ├── ioport.h # Port I/O functions
│ ├── vga_dma.h # VGA buffer operations
│ └── igdt.h # GDT structures (WIP)
├── link.ld # Linker script
├── Makefile # Build configuration
└── README.md # This file
Perintah yang sudah tersedia:
print- Tampilkan pesan "Hello world"clear- Bersihkan layar dan reset line countershutdown- Matikan VM (khusus QEMU/Bochs)debug-mode- Tampilkan status debughelp- Tampilkan daftar perintahchange-color- Ganti skema warnareset- Reset state terminalload-kernel- Inisialisasi protected mode (WIP)- Dokumentasi masih terbatas karena hanya sebatas uji coba
0x0000 - 0x03FF : Interrupt Vector Table (IVT)
0x0400 - 0x04FF : BIOS Data Area (BDA)
0x0500 - 0x7BFF : Free conventional memory
0x7C00 - 0x7DFF : Boot sector (stage 1)
0x7E00 - 0x???? : Kode kernel (stage 2)
0x9000 - 0x9000 : Stack (tumbuh ke bawah)
0xA0000 - 0xBFFFF : Video memory
0xB8000 - 0xBFFFF : VGA text mode buffer
Entry 0: Null descriptor
Entry 1: Code segment (base=0, limit=4GB, ring 0)
Entry 2: Data segment (base=0, limit=4GB, ring 0)
- Masih beroperasi di 16-bit real mode
- Terbatas pada pengalamatan memori 1MB (A20 belum diaktifkan)
- Masih menggunakan BIOS interrupts (akan dihapus di protected mode)
- Belum ada interrupt handling selain BIOS
- Single-tasking saja
- Belum ada dukungan filesystem
- Hanya akses hardware langsung
- Transisi protected mode belum stabil
- Aktivasi A20 line perlu testing di hardware asli
- Beberapa kode shutdown khusus QEMU (port 0x604)
- Tidak ada error handling untuk disk reads
- Inisialisasi keyboard controller mungkin gagal di beberapa hardware
- Boot dari disk
- Load sektor tambahan
- Driver I/O dasar
- Shell sederhana
- Setup dan loading GDT
- Aktivasi A20 gate
- Implementasi mode switch
- Entry point kernel 32-bit
- Inisialisasi IDT
- Konfigurasi PIC (8259)
- Framework IRQ handler
- Timer interrupts
- Keyboard interrupts
- Deteksi physical memory
- Page frame allocator
- Setup paging
- Virtual memory manager
- Driver disk (ATA)
- Filesystem (FAT12)
- User mode
- System calls
- Multitasking
Ini adalah proyek pembelajaran pribadi, namun saran dan improvement tetap diterima.
Proyek ini disediakan apa adanya untuk tujuan edukasi.
- Intel 80386 Programmer's Reference Manual
- OSDev Wiki: https://wiki.osdev.org
- Ralf Brown's Interrupt List
- Writing a Simple Operating System from Scratch (Nick Blundell)
qemu-system-i386 -fda os.img -monitor stdiobochs -f bochsrc -qPerintah debugger umum:
c- continues- stepb 0x7c00- set breakpointx /10wx 0x7c00- examine memoryinfo gdt- tampilkan GDTinfo idt- tampilkan IDT
-m16- Generate kode 16-bit-ffreestanding- Tanpa standard library-nostdlib- Jangan link standard library-fno-pie- Tidak ada position independent code-fno-stack-protector- Disable stack protection-static- Static linking saja
-f bin- Output flat binary-f elf32- Output objek ELF 32-bit
Terinspirasi dari berbagai tutorial OS development dan komunitas OSDev.
Terakhir diupdate: Januari 2026 Status: Pengembangan Aktif (Pre-Alpha)
