proOS is a BIOS/MBR 32-bit hobby operating system made by me!
boot/mbr.asm– 512-byte MBR that loads the stage-2 loaderboot/stage2.asm– real-mode loader that switches to 32-bit protected mode, loads the kernel and a FAT16 disk image, and passes VBE framebuffer info to the kernelkernel/– kernel sources (entry stub, linker script, VGA, shell, RAMFS, interrupts, drivers, scheduler)kernel/vbe.c|h– framebuffer driver and text console shimkernel/gfx.c|h– minimal compositor and demo windowskernel/fat16.c|h– in-memory FAT16 reader used forlsfs/catfskernel/memory.c|h– bump allocator backing window bufferskernel/fat16_image.c– host helper that generatesbuild/fat16.imgfor Stage 2 to loadiso/make_iso.sh– helper to wrap the raw image in an El Torito ISOMakefile– builds the bootloader, kernel, and raw disk imagetests.md– manual tests for this phase
Use MSYS2/WSL2 or another Unix-like environment on Windows. Install:
nasmi686-elfcross toolchain (i686-elf-gcc,i686-elf-ld,i686-elf-objcopy)xorriso(for ISO creation)qemu-system-i386(optional, for quick testing)gcc(host compiler used to build the FAT16 image helper)
Ensure the cross toolchain binaries are on your PATH.
makeOutputs land in build/:
proos.img– bootable raw disk imagekernel.elf/kernel.bin– linked kernel artifactsmbr.bin,stage2.bin– boot stagesfat16.img– 16 KB read-only FAT16 volume preloaded withreadme.txt
Create an ISO (requires xorriso):
make isoThe script writes build/proos.iso.
Clean artifacts:
make cleanmake run-qemumbr.asmloadsstage2.asminto 0x7E00.- Stage 2 loads the kernel into 0x00010000, enables the A20 line, enters protected mode, copies the kernel to 0x00100000, and jumps to
_start. _start(fromcrt0.s) sets up the stack and callskmain.kmaininitializes VGA text mode, prints a banner, initializes the RAMFS stub, and starts the shell.- The shell waits for keyboard input (IRQ-driven) and supports:
helpclearecho <text>/echo <text> > <file>memrebootlscat <file>proc_list
- Cooperative scheduler boots a user
initprocess that spawns a userecho_servicevia syscalls and demonstrates IPC (ECHO: Hellobanner at boot). - FAT16 image is copied to 0x00200000 and exposed via
lsfs/catfsshell commands. - When
gfxis entered, the framebuffer compositor draws a demo desktop with windowed output; keyboard input remains routed to the shell.
- FAT16 support is read-only, limited to 8.3 filenames in the root directory.
- Framebuffer path assumes a 32-bpp VESA mode; systems without that support fall back to VGA text automatically.
memreports hard-coded values.- RAMFS remains a stub for scratch files.
rebootrelies on controller reset and may fall through to an infinitehltif unsupported.