Documentation?
I would really like to make my own OS, but there is no documentation.
So how can I?
There's really no "one way" to make an OS. You just kinda have to wing it. There are some good tutorials online (like wiki.osdev.org or jamesmolloy.co.uk) but even those OS's are pretty limited. There are a bunch of components that go into an OS, and that's kinda why something like the Linux kernel is still around.
As in I want to use Snek.
Oh, alright. In the Makefile for pythonOS, there is a call to os.system that includes the arguments to snek. It is snek <input filename> <output filename>.
Oh, alright. In the Makefile for
pythonOS, there is a call toos.systemthat includes the arguments tosnek. It issnek <input filename> <output filename>.
Got it. Thanks. Also, I cloned pythonOS to my drive and am now making changes. Is there a way I can get user input?
From they keyboard?
Yes
https://forum.osdev.org/viewtopic.php?f=1&t=28437
In Python
This is the result of me using input().

The basic fundamentals still apply. Using Python-to-C translators haven't really been used for OS development before, and snek is even newer. If you haven't done OS development before, it'll be even harder doing it in Python.
This is the result of me using
input().
Well, in that regard, it looks like the bootloader isn't finding the kernel image. Not sure about that.
If you haven't done OS development before, it'll be even harder doing it in Python.
Yeah that's true. I've never actually went through and completed an OS.
The basic fundamentals still apply. Using Python-to-C translators haven't really been used for OS development before, and
snekis even newer.
That is something I never knew about. I assumed all the PythonOSes used something like snek.
This is the result of me using
input().Well, in that regard, it looks like the bootloader isn't finding the kernel image. Not sure about that.
I think that input() isn't being recognized in C, causing it to not compile correctly and just continue and error out.
Do you have a repo for your code?
Nah, but I can create one quickly.
Okay, I might be able to diagnose the error then.
Okay it's TechStudent11/snek-test
Okay, thanks.
Alright. I see the issue. The reason that Limine can't find the kernel executable is because the compiler isn't happy. I re-wrote the build script to make sure that every call to os.system recognized an error and stopped the program. It can't find input because it isn't in the OS (yet).
So you'll have to do it the old-fashioned way and read wiki.osdev.org.
Alright. I see the issue. The reason that Limine can't find the kernel executable is because the compiler isn't happy. I re-wrote the build script to make sure that every call to
os.systemrecognized an error and stopped the program. It can't findinputbecause it isn't in the OS (yet).
That makes sense.
So you'll have to do it the old-fashioned way and read wiki.osdev.org.
Ah I guess. When I saw Snek I got super excited that now I was able to write an entire OS in my favorite language but oh well C and Assembly it is.
It's fine if you do it with snek, but I'd recommend C + Assembly to understand the wiki and for usability. You know what, I should make a C-to-Python translator instead...
Thanks for your help.
Yeah, no problem.
You know what, I should make a C-to-Python translator instead...
That would be awesome. I've never seen a C to Python translator. Maybe instead of CPython, you'll call it PythonC haha.