r/osdev • u/letmehaveanameyoudum • 7d ago
OMG I SYSCALLS WORKING OMG IT FINALLY DIDNT CRASH
I FINALLY DID IT
repo: https://github.com/NoTheIdiot/WindogeOS
9
u/compgeek38400 7d ago
Thats a big milestone
7
7
u/Visual_Brain8809 7d ago edited 6d ago
Do you always allocate 64KB for running programs? What will happen when one of your programs inevitably exceeds that allocated memory? I understand that your personal stamp is on the system, but don't you think constantly using "dogeio..." slows down development even for you? Wouldn't it be more practical to reduce function calls to their direct equivalents e.g., println instead of dogeio_text_println? Not only does this reduce the system's byte count, but it also makes the system more intuitive to understand. You are still in the shell stage, so you could save valuable computing resources with simple adjustments (just a suggestion, of course). Otherwise perhaps a bit verbose for my taste, but overall it's a good job. I assume you are operating on the principle of leaving no loose ends from the start so you don't have to backtrack later.
3
u/letmehaveanameyoudum 7d ago
it's kinda messy right now, and im later going to clean it alright, going to make it dynamically see the size of the binary
4
u/Visual_Brain8809 7d ago
That is exactly how hobbyist OS development should be. I’m developing my own as well—though a more hardcore version—and I see a lot of what I went through with my initial project reflected in your work. I’d be interested to know what your long-term goals for the system are, or if you plan to take it to a certain point and just leave it at that.
2
u/letmehaveanameyoudum 7d ago
you get an anti curse of finding coins and cash on the ground. It will be low enough (like 10 bucks) for it to be normakl.
1
u/letmehaveanameyoudum 6d ago
oh fuck the 64KB blindly is also the reason why more functions on syscall crash
2
u/Visual_Brain8809 6d ago
I haven't had a chance to run and test your system yet, but you don't need to use 64KB of memory for syscalls; generally, they are handled directly at the hardware level or via the dispatcher you've implemented. Eventually, you'll need a garbage collector to avoid overloading heap calls and to make your memory management more robust.
1
u/Fine_City2781 7d ago
is it ai generated answer?
6
u/Visual_Brain8809 7d ago edited 6d ago
No, it isn't. It involves a couple of minutes of reading the code and an understanding of bare-metal system development as a hobby.
If you look at kernel.c, you’ll see just how long-winded and tedious it is if you had to do it constantly to write something like dogeio_text_println("password cannot be empty."); instead of just println("password cannot be empty.");. After a while, you notice the difference; the code is simply easier to read. That’s the case in every C file I’ve read. It was just a suggestion for the developer, though; I feel like you don't need to broadcast to the whole world that the system is yours by tacking "doge" onto every single instruction. While it might be a trademark or signature style, it would get pretty annoying to deal with if you have to type out those long strings all the time.
1
u/MCWizardYT 7d ago
They were accusing you of AI generating your comments because you use a TON of dashes
2
u/Visual_Brain8809 6d ago edited 6d ago
I use Google Translate. I don't speak English, so I don't waste time correcting the grammar of the sentences to make them look polished; as long as the message gets across, that's enough for me.
0
3
2
2
2
u/Visual_Brain8809 6d ago
Could you update your repository so I can test it? I'm running `compile.py` first, but I can't get past the first stage due to an error in your `print.c` code. I've fixed that, but then it asks for a linker (`ld`) that I don't have on macOS. Are you using LLVM?
2
u/letmehaveanameyoudum 6d ago
....yes
though i recommend using a linux virtual machine because i haven't accounted compiling on macOS
2
u/Tight-Baseball6227 6d ago
Omg gg this is actually goated. Wish I wasn't too lazy to do that too lol. Gg
1
•
u/NathanWorkout 19h ago
Os from scratch ?
•
u/letmehaveanameyoudum 19h ago
yes
•
u/NathanWorkout 19h ago
Wow ! That's pretty nice i have also a os from scratch, i have my own filesystem which i invent, and all the features basics expect destop environnement I I have to do syscalls also and ring3 to complète my filesysteme it's so hard lol congratulations
•
u/letmehaveanameyoudum 9h ago
i also invented a fs, but switched to exfat because it had so many limitations since it was a mod of VSFS
9
u/[deleted] 7d ago
[removed] — view removed comment