TJBos (TJB Operating System) is an experimental hobby operating system with a kernel written primarily in Fortran 90, complemented by x86 Assembly for low-level operations. It's a minimal bootable OS that runs in 32-bit protected mode, featuring a simple text-based shell, keyboard input, VGA output, basic commands, and FAT12 filesystem support.
-
Custom bootloader (16-bit Assembly) that loads the kernel from a FAT12 floppy image
-
Switches to 32-bit protected mode with GDT and IDT setup
-
Keyboard interrupt handling (IRQ1) with basic US QWERTY mapping
-
VGA text mode output with color support
-
Simple shell with commands: HELP - List available commands CLEAR - Clear the screen DIR - List files in root directory ECHO - Print text USERNAME - Set a custom username (up to 10 chars) CAT - View file contents (e.g., CAT HELLO.TXT)
-
Basic FAT12 filesystem reading (root directory and file loading)
-
Includes a sample HELLO.TXT file with a greeting from the OS
As you might have noticed, there are a lot of comments in the .asm files. Yes these comments are indeed made by AI - the code isn't, and you can see that in the commit history :)
You need an i686-elf cross-compiler toolchain.
- Assembler:
nasm - Compiler:
gfortran,gcc - Emulator:
qemu-system-i386
- Clone the repo.
- Run
./build.shto generatetjbos.img. - Launch with QEMU:
qemu-system-i386 -fda tjbos.img ```
boot.asm - Bootloader kernel.f90 - Main kernel in Fortran lib.asm - Utility functions (memory ops, I/O, interrupts) linker.ld - Linker script build.sh - Build script tjbos.img - Bootable floppy image (generated)