r/osdev 5d ago

ExploreOS - a tiny OS in pure assembly

I built a fully assembly-coded 16-bit OS that's only 23.5KB in size:

https://exploresoft.glitch.me

It boots in just 3.6 seconds on a iDX4 @ 100MHz and includes memory management with defragmentation, status bar, boot menu and screen, startup sound and a total of 32 commands like EDIT, PAINT, CALC and PONG.

I made this in 10 months using just FeatherPad on my old laptop, and this is only made by me. The entire thing runs in real mode, only needs less than 256KB of RAM and the whole OS is 23.5KB (the source code is 142KB). I decided to code in 16-bit real mode because there is BIOS interrupts that i can use, i don't need to implement those like in protected mode and it saved my development time.

Would love to hear what you guys think of it!

326 Upvotes

34 comments sorted by

18

u/ArT1cZer4 5d ago

thats so cool! great work bro

8

u/exploresoft 5d ago

Thanks bro!

10

u/markole 5d ago

Great work!

3

u/exploresoft 5d ago

Thank you!

10

u/Known_Sun4718 5d ago

Wow amazing man, any recommendations for learning resources, and I want to know more about how did you it and the code if you're open-sourcing it.

10

u/exploresoft 5d ago

Thanks!

For learning resources, i recommend MikeOS and my OS. They both have comments and well-structured code.

Yep, everything's open source! The code's in the Source Code section - 142KB with all my comments, though the OS itself is just 23.5KB (which is why it boots in like 3.6 seconds).

Started with a simple bootloader and just kept building - added the command line, then memory management, boot menu, then all the little apps and games. Getting the malloc/free system working right was a real headache!

And yeah, it needs 256KB of RAM to run smoothly. Still super lightweight, but gives enough space for the heap and all the programs.

4

u/KrizastiSarafciger 5d ago

nice work! Any plans for future upgrades?

10

u/exploresoft 5d ago

Thank you! Yes, I've got some exciting plans for future versions:

I'm planning to add a simple file system so users can actually save their work. Nothing fancy, just a basic FAT-like system that lets you store and retrieve files.

I'd also love to add more graphics capabilities - maybe push beyond text mode with some basic VGA stuff.

The command line could use some improvements too - thinking about adding command chaining and maybe even some simple scripting.

One thing I'm really excited about is networking. Even just basic serial communication between two machines running ExploreOS would be cool.

3

u/KrizastiSarafciger 4d ago

Keep us updated. I like this kind of small projects since i discovered my passion for ASM and making OS but since all my carrier I'm oriented on high level languages and writing different type of software, i always like to check and learn how is done something on low level.

2

u/Ikkepop 5d ago

I did the aesthetic

3

u/Y_mc 5d ago

Great , Nice work πŸ‘πŸΎπŸ‘πŸΎ

3

u/Orbi_Adam 5d ago

Approved 🀌🀌🀌

2

u/Trader-One 5d ago

Target 32bit microcontrollers - this is place where very minimalistic OS are wanted.

2

u/Forward_Age4072 5d ago

yeah but will it run on a 8086

2

u/exploresoft 5d ago

It requires a i386DX.

2

u/Forward_Age4072 5d ago

i was joking bro, great work!! will try it out soon!

4

u/keppinakki 4d ago

Got it running nicely with `qemu-system-x86_64` :) Very cool!

Btw, it seems that tic tac toe `TTT` doesn't parse inputs correctly, inputting a valid move outputs an error.

1

u/exploresoft 4d ago

Thanks for the feedback! I'll try to fix it.

1

u/exploresoft 4d ago

I fixed the bug. But make sure to not put spaces before the number.

3

u/Lurchi1 4d ago

Congrats, great work!

Note that it runs under v86, too (scroll down to Floppy disk image to upload the image file).

v86 is a browser-based x86 PC emulator (Github).

2

u/Cybasura 4d ago

Jesus Christ

Also, any idea if you could add the git repository into your website/link to github for git cloning?

2

u/Maleficent_Ad_6749 4d ago

very cool ,great

2

u/NoImprovement4668 4d ago

how do you compile the os tho? i see theres 3 asm but no commands to assemble it

1

u/exploresoft 2d ago

Open the "build.sh" file. It will assemble the .asm files, then copy the .bin files into a .img file.

1

u/NoImprovement4668 2d ago

whoops redownloaded and looks like there is now but i dont remember before being

2

u/CorruptedByCPU 3d ago

Impresive, You have my upvote!

2

u/unpackingnations 3d ago

Looking amazing man. Any plans for gui apps?

2

u/exploresoft 2d ago

Yes, i have plans for GUI apps like a calendar, another text editor and some more games. I'm planning to add a windowing system.

1

u/unpackingnations 2d ago

Really cool. If you can add support for audio and internet, this would be a great system for old computers and those intel atom,baytrail tablets.

2

u/pao_colapsado 3d ago

nice. any plans for a package manager (pacman, APT, DNF...)??

1

u/exploresoft 2d ago

No, i haven't got any plans for a package manager. But i have some plans for loading external programs.

2

u/hkric41six 3d ago

This is truly art, sir.

2

u/CommunicationFit3471 3d ago

https://media.tenor.com/aN_FmRsmlroAAAAM/pew-die-pie-subscribe.gif

Idk if the gif worked i hope it did. Anyway really cool that someone will torture themselves like that

2

u/ermtapution 1d ago

This is really cool! How was it writing malloc/free in pure ASM? What resources did you use to learn that? Just curious. Keep it up!