- VGA text output with colored text, scrolling, and basic terminal emulation.
term_putcharnow uses aswitchstatement for extensible control character handling (newline, backspace, etc).- Backspace (
\b) support: erases the previous character on screen. - Easily extensible for more control characters (tab, carriage return, etc).
- Full IDT setup (
idt_install) and PIC remapping. - Clean separation of ISRs (CPU exceptions) and IRQs (hardware interrupts).
- IRQ handlers can be registered per line; unhandled IRQs print their number in decimal.
- Assembly stubs fixed to pass correct register state to C handlers.
- Timer: PIT initialized to 100 Hz; handler increments a tick counter (ready for scheduling).
- Keyboard: Basic US QWERTY layout, prints characters to terminal, supports Enter, Backspace, Tab. Keyboard buffer can be extended for line editing.
scripts/linux-build.shcompiles all drivers, kernel, and interrupt code, links to ELF, and produces a bootable image.- Automatically calculates kernel size for MBR.
- Fixed IRQ handler pointer bug: now receives correct IRQ numbers (0-15).
- Backspace no longer prints a dot; instead, it erases as expected.
- Improved error messages for unhandled IRQs.
-
Set your current directory to
rotOS -
Make scripts executable:
sudo chmod +x ./scripts/*.sh- Install cross tools (if needed):
sudo ./scripts/linux-tools.sh- Build the OS:
sudo ./scripts/linux-build.sh- Run in QEMU:
sudo qemu-system-x86_64 os-image.binThe emulator should display:
Welcome to rotOS!
System initialized successfully.
Terminal is ready.
Memory initialized.
Interrupts installed.
Timer initialized (100 Hz).
Keyboard initialized.
Interrupts enabled. Type something!
You should be able to type on the keyboard and see characters echo, with working backspace.
kernel.c— Kernel entry, terminal, and core logickernel_entry.asm- Kernel entry point (assembly)drivers/— Keyboard and timer driversinterrupt/— IDT, ISR, IRQ, and low-level interrupt logicscripts/— Build scriptsbootloader/— MBR and boot sector codebuild/— Output binaries (after build)
- The kernel is modular and ready for further extension: paging, scheduler, advanced terminal, etc.
- For debugging, unhandled IRQs will print their IRQ number.
- See code comments for extension points and TODOs.