how to make an operating system
hello i wamt to make an operating system using c in repl.it but how i do it please help
OSdev is the hardest thing you'll challenge yourself to do in your career of low-level development.
Take it from a guy who writes compiled programming languages and who has also attempted to create an OS. It is, indeed, not an easy project, and even for those people that are a pro at low-level languages like NASM and C find it challenging to create an OS.
The development of an OS is not a month project, nor a short 2 month project. No. OSdev is more like a year type of project(and maybe more).
Not only do you have to know low level languages like NASM, but you have to know how to assemble the bootloader and the kernel, which are the first few steps of any OS.
That in and of itself is hard. I am not even gonna waste my time getting into all of the other things required to create an OS. Believe me, when you start to work on the bootloader, you'll slowly come to the reality that: holy sh*t, this is way harder than I thought.
Then, when you get to the assembly of the kernel, you'll basically commit virtual suicide because you'll go days of starring at nothing but either A. documentation that makes no sense to you whatsoever and throws you 101 directions with different programs or B. errors that you have no clue wtf they mean or wtf they stand for.
If I were you, I'd start small. Besides, while OSdev is quite fun and interesting and you learn allot from it, it is also a huge waste of time. You will end up wasting countless hours, many of them where you're shoving your head into your pillow screaming at the top of your lungs because you simply can't figure any of the stuff out.
Start small. Start off with creating a simple programming language(interpreted). Once you get the hang of the simple operations put in place to create an interpreted language and make an actual functional dynamic language, then dive deeper and give your taste buds the sweet taste of some x86 assembly and create a compiled language.
After you get the hang of creating a compiled language(which will take at least a month, if not two), then, at your own cost, feel free to dive into the world of OSdev.
I might attempt to create an OS again, since I have been working with assembly for almost 7 months now and since I am pretty advanced in C and have common knowledge on the low-level workings of a computer.
Start small, and get bigger.
First of all, do you have any C knowledge?
An operating system consists of 2 main parts: the bootloader and the kernel. REPL is an online IDE, not an actual computer that doesn't have limitations. Some people have created an operating system on REPL, but that's just copying the compiled ISO onto REPL and running it with Qemu. If you wanted to make an actual operating system that can run on amd64/arm machines, you need to learn Assembly and use NASM to create your bootloader. Please note that creating an operating system could take months, or possibly years.
@KA3369 Creating an operating system in Python is nearly impossible because Python is an interpreted programming language that heavily depends on an existing program to execute. I'm pretty sure there is a way to run the Python interpreter without an operating system, but still, Python is not fast enough to handle all sorts of CPU/Memory commands.
an OS in Python is nearly impossible
Let me correct you. An OS in Python IS impossible. Python is too high level and too dynamic to even think of creating a programming level. If anyone thinks they can make an OS in Python is either A. Insane or B. Is creating the outline of the terminal. That’s all it would be.
Most people would use some type of library that makes a window pop up and they’ll title it “This is my NEW OS!”
Python is incapable of memory alignment, memory allocation etc. C, on the other hand, is the perfect language.