Skip to content
/ nos Public

32-bit x86 Operating system written from scratch with custom NASM bootloader, a complex Haskell Shake build system and C++ kernel and drivers. Currently able to boot and read ATA drives.

License

Notifications You must be signed in to change notification settings

maximsmol/nos

Repository files navigation

nOS is a from-scratch x86 (32-bit i386) operating system.

nOS is primarily developed as an exercise and for the purposes of education of the author. Nevertheless, it can be used as a high-quality example code-base and for code samples.

Status

Video

Screenshot

nOS running in qemu-system-i386 on Mac OS Mojave, displaying:

  • The arguments to kmain
  • Lines indicating successful load of the kernel and the partition table
  • A dump of the partition table
  • A dump of the BIOS memory map
  • A set of key-press events

Features:

Planned fatures:

  1. PIC support
  2. Physical memory manager
  3. Memory virtualization. So far a flat physical memory model is used
  4. Virtual memory manager
  5. Kernel console
  6. IRQ support
  7. Kernel and bootloader debugging functionality
  8. ?Load time relocation support
  9. System shell
  10. Inter-process communication
  11. Kernel stripping

Known issues:

  • Does not enable the A20 line upon boot, relying on it being on by default.
  • Kernel overrides the bootloader's GDTR to point to an equivalent GDT
  • Driver API makes it easy for the consumer to write buggy code

Building

nOS uses Shake.

Dependency list

After installing the dependencies, simply run ./build.sh from the project folder.

Manual

Use ./run.sh to run the application once built.

About

32-bit x86 Operating system written from scratch with custom NASM bootloader, a complex Haskell Shake build system and C++ kernel and drivers. Currently able to boot and read ATA drives.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published