Skip to content

codenik01/NullOS

Repository files navigation

NullOS

Custom x86 Operating System Kernel built from scratch using Assembly & C



A low-level operating system project focused on understanding how computers work internally by building core OS components manually.


About NullOS

NullOS is a custom operating system kernel written from scratch using x86 Assembly and C.

The project started as a low-level systems programming learning journey and gradually evolved into a working protected-mode kernel with its own shell, keyboard driver, VGA terminal system, scrolling support, and command handling.

Instead of relying on existing operating systems or frameworks, NullOS directly interacts with hardware components like VGA memory, BIOS interrupts, and keyboard controllers.


Current Features

  • Custom x86 Bootloader
  • Real Mode → Protected Mode Switching
  • Global Descriptor Table (GDT)
  • VGA Text Mode Terminal
  • Direct Video Memory Programming
  • Keyboard Driver
  • Working Shell / Command System
  • Cursor Control
  • Backspace Handling
  • Screen Scrolling
  • Command Buffer System
  • Hybrid ASM + C Kernel Architecture
  • Freestanding Kernel Environment
  • QEMU Boot Support

Working Commands

help
about
clear

Tech Stack

Assembly NASM x86 Assembly
Language C (Freestanding)
Compiler i686-elf-gcc
Linker GNU LD + Linker Scripts
Emulator QEMU
Architecture x86 Protected Mode
Build System Makefile

Project Structure

NullOS/
│
├── boot.asm
├── kernel_entry.asm
├── kernel.c
├── linker.ld
├── Makefile
│
├── boot.bin
├── kernel.bin
└── nullos.img

Build Requirements

Install required tools:

brew install nasm qemu i686-elf-gcc i686-elf-binutils

Build & Run

Build

make

Run

make run

Manual Run

qemu-system-x86_64 \
-drive if=floppy,format=raw,file=nullos.img \
-display cocoa,zoom-to-fit=on

Development Challenges

Some interesting low-level problems faced during development:

  • Cursor rendering glitches
  • Wrong cursor positioning in VGA text memory
  • BIOS disk read failures
  • Protected mode transition bugs
  • Keyboard scan code handling issues
  • Mixing Assembly and C safely
  • QEMU floppy vs raw image boot conflicts

A large part of the project involved debugging behavior without logs, exceptions, or operating system support.


Next Goals

  • Interrupt Descriptor Table (IDT)
  • Hardware Interrupts (IRQ)
  • Memory Management
  • Paging
  • Filesystem
  • Multitasking
  • Mouse Support
  • Basic GUI
  • Drivers

Screenshots

Comming soon


Author

Nikhil Chavan

GitHub: github.com/codenik01


NullOS — Learning Operating Systems from the Lowest Level

About

Custom x86 operating system kernel built from scratch using Assembly and C with protected mode, VGA terminal, keyboard driver, and basic shell support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors