ReplOS - A *REAL* Operating System on repl.it!
With pure C and Assembly. This is very quirky, I had to change a lot of stuff moving it onto replit.
Due to the way I did gdt setup and other things I couldn't actually get paging or switching to user mode to work. I still made what was essentially a "user program" but it cant even be loaded on replit!
Im not going to be improving this any more due to its inability to enter user mode. After I failed paging I intended to just use segmentation but without being able to enter user mode users could just change their own segments to anything they wanted. The only way to implement user programs now is some kind of interpreter embedded into the kernel.
@BryceBrower For some reason or something repl did, qemu no longer wants to work on repl.
So to run any real OSes on repl you now how to download them and compile/run them yourself. It sucks because I was working on a new OS in rust that could do way more than these. Now I can't even share it once I finish it.
How did you do this? Also, could you actually compile this to make a standalone OS? I've been looking up how to make an OS, but have no idea how. I've been learning the C programming language, but don't know how to use it to make an OS. Also, do you know how to create a desktop OS? Of course, it is best to start with a command line OS, but a desktop OS is best for a final product.
@AmazingMech2418 Yes, it gets compiled to a standalone OS, but to test it without putting it on real hardware you need an emulator like qemu or bochs(preferred). I was going to add a gui but without paging it would not of been very useful, im going to be uploading an improved version of this which can enable paging and enter user mode once I finish it.
Littleosbook covers setting up the build environment and getting it working with C.
But you should also get familiar with assembly as you can't make an operating system in just C alone
@JordanDixon1 C and C++ compile to assembly, which is why you can use them in OS Dev. There are projects like Cosmos which allow you to use C# and some others which let you use languages that don't normally compile to assembly. but all of those projects you will find they compile the language to assembly first
@sugarfi Micropython is hardware, and Numba is a JIT compiler. You still need an interpreter, even if you manage to compile python to assembly without the risk of compilation mistakes.
1) It would still be slower than when done in C and Assembly
2) Python has no form of memory management
@sugarfi Im not talking about running speed, im talking about the extra steps it takes to do things C comes built in with.
You could try to add memory management into python, but it isn't built for that and C is, so when something goes wrong you might be questioning whether your doing something wrong or if the memory management itself is buggy
Ooo, fancy. I like the idea of a windowed terminal.
Though, I wouldn't call this a real OS because that would imply that it is a bootable image on the computer, not just some overlay program.