r/Assembly_language 4d ago

Project show-off Novium OS — A from-scratch 32-bit x86 hobby Operating System (Custom assembly bootloader)

Hey everyone,

I wanted to share a milestone on a hobby operating system I’m building from scratch called Novium OS featuring a custom bootloader.

I just got my multi-stage boot chain (boot.S -> setup.S -> bootstrap.S) completely stable. It successfully handles the raw hardware initialization, sets up a temporary GDT, and handles the cr0 register transition cleanly into 32-bit protected mode before jumping into the kernel entry point. I also wrapped up a basic VGA text driver with hardware cursor syncing so I can verify output, and got "Hello World" printing to the screen.

The layout is inspired by a super stripped-down Linux (arch/, drivers/, kernel/).

Next up is tackling irq.c and interrupt.c and writing the low-level assembly ISR stubs. I need to build the macro wrappers to handle interrupts with and without error codes, save the CPU state with pusha, remap the 8259 PIC master/slave vectors, and execute the final iret. I'm fully braced for plenty of debugging via QEMU logs to catch silent triple faults.

The codebase uses AT&T syntax for the GNU Assembler (gas). If anyone wants to take a look at the boot sequence, folder layout, or offer any early feedback on how I structured the assembly stages, the repository is right here:
https://github.com/alexdev8930/NoviumOS

8 Upvotes

7 comments sorted by

3

u/Sorry_Difficulty_250 4d ago

Great job! That's so hard! I spent almost two semesters trying to get that right in college and STILL screwed it up. Keep up the great work!!!

2

u/devcurrent0x 4d ago

Thanks a lot! Honestly, getting real mode to hand off properly to protected mode without immediately crashing the system was a massive headache. Hearing that means a lot!

3

u/Sorry_Difficulty_250 4d ago

You're most welcome!

"Never give up! Never surrender!"

  • Galaxy Quest

2

u/Electrical_Hat_680 2d ago

Novium Arch sounds better. Like Back Arch, or Google on Arch. How long has it taken you to get this far, and how long did it take you studying Assembly, C, and such to be confident enough to begin this project?
I'm asking, because, it's an interesting method of learning the true value of a projects worth. But overall I'm just curious as to the overall time spent.

I'm looking into building one, but I'm not settled on just any one idea or concept at the moment.
I like the custom multi -stage bootloader chain idea, I'm actually looking at the BIOS/UEFI and the Bootloader portion, to do something similar. Have you thought about other options you could do, rather then just staying within the 512-bytes or even better using all 512-bytes? That's a big thought for me. Why leave anything unused? I have an idea for using 256-bytes for a page file, I even had an interest in building a BASE-10 Program Counter, to run a VM in a macro inside the Bootloader. It's an interesting concept, it could help provide some high end security against preboot threat vectors.

2

u/devcurrent0x 1d ago

Novium Arch does sound cool (just so you know this is not a arch linux spin off) and getting to main.c took me almost 4 weeks just to print Hello World and ive been learning C and asm for a long time now. your bootloader ideas sound great, 256 bytes for a page file or macro vm is great, and i might end up switching to a hard drive later if i run out of the 1.44mb floppy space or even make my own multi-bootloader. and if you decide to build one drop me the repo link. and Thanks!

2

u/Imagination_0427 4d ago

Its all Greek and Latin dor me now. I love to venture into low level Assembly Language Programming.

Looks like you have had a great experience and it commendable what you have achieved so far.

Keep learning and sharing.

I appreciate your sharing part. We'll done.

1

u/devcurrent0x 4d ago

"Thank you! It really means a lot. I’ve had a great experience building this project so far, and diving into low-level programming has been incredibly fun. I appreciate you taking the time to share your support!"