Submit templates for repl.it/templates here.

← Back to all posts
32-Bit Operating System Template
[deleted]

OS Template

OS Development is a very interesting topic. I personally love OSDev, and I think you will too! I made this template of a 32-Bit operating system if you wanted to start from here!

What is an OS?

An OS (operating system) is a piece of software that runs on a computer, that allows the user to interact with the computer easier. Many advanced programmers dive into this topic and create their own operating systems. Examples are MacOS, Windows, and Linux. OS's can be made in Assembly, C and many other great programming languages.

How to use this template

This template provides the bare bones for an operating system. All this does is display "Hello, World!" on the screen, but this can easily be built on to have many more features. Some fun suggestions are to add user input, or maybe some graphics or games.

Conclusion

That is basically it! I hope you enjoy this template. If you want to read more on OSDev, you should read a bit on the OSDev wiki (wiki.osdev.org).

Thank you!
-Lucas

Comments
hotnewtop
ANDREWVOSS (187)

Does anyone have a fork of this template? If so, please ping me, because I'd like to fork the original but the poster deleted their account.

programmeruser (595)

You forgot to link with libgcc.

programmeruser (595)

@mollthecoder it's the default bios that comes with QEMU.

VespineCon (0)

This is so cool how did u do this?

skeppycodr123 (1)

hi i saw the notification lol

[deleted]

@skeppycodr123 its an operating system

17lwinn (0)

Hi! Any chance user input will be available sometime soon?

[deleted]

@17lwinn most likely

[deleted]

@17lwinn if assembly language will have mercy on me lol

17lwinn (0)

@LucasAllori any time soon? And if i decide to use pure C would it work? (Remove the library and just type C)

[deleted]

@17lwinn umm yes, however stdio wont be avalible

17lwinn (0)

@LucasAllori i tried and despite using stdio.h I got

Libc-header-start.h no such file

[deleted]

@17lwinn I know, you must define those functions yourself. You cannot use stdio.h

[deleted]

@17lwinn Yeah, thats kind of why OSDev is so hard. Once I add user input though, this will have everything needed for a basic shell.

17lwinn (0)

@LucasAllori once it's ready- I can start making a working shell, great work so far!

programmeruser (595)

@LucasAllori tip: you'll have to write a simple driver for PS/2 keyboards by communicating with I/O ports with byte input and output (there's more on this in the osdev wiki).

17lwinn (0)

@programmeruser im starting my own project- using that github repo on building an OS

CodeLongAndPros (1624)

@LucasAllori Pmode? In real mode you can use bios I think...

CodeLongAndPros (1624)

@LucasAllori np. Note that if you need > 64kb of ram, you should switch into Pmode, where bios calls will not work

[deleted]

@CodeLongAndPros alright, thank you!

17lwinn (0)

I might use this- thanks!

[deleted]

@17lwinn no problem!

[deleted]

@AmazingMech2418 the thing to check ifqemu is already installed, yes actually.

[deleted]

@TsunamiOrSumth Day 7 is not
but days 2,3,and almost 4 are
plus bug fixes

[deleted]

@TsunamiOrSumth PS: i am on rn