HN user

joexbayer

541 karma
Posts14
Comments41
View on HN

Up to TCP most protocols are very straight forward, atleast getting them to work semi reliable. But then TCP explodes in complexity with all the state management and possible paths a connection can take.

HTTP is mostly annoying because of all the text parsing :D

[dead] 11 months ago

I’ve had a bunch of images of my OS lying around from over the years. Luckily, I started taking them early, all the way back to the textmode days. I thought I’d put together a small post series to look back on the different stages and how it’s evolved.

Any feedback is welcome! Hope you enjoy.

Been working on this site for a while after working on my own hobby OS for a few years. Idea is to have a central place to share and gather hobby operating systems.

Its possible to login with github and import projects from gitlab, codeberg and github. You can also import your projects without a user (although you wont be able to manage the project then).

Also allows posting "posts" on your project (devlogs, blogs, discussions, releases). Its all still in beta and got some future ideas that would be cool to implement. Would love any ideas or feedback.

Been posting changelogs at: https://oshub.org/changelogs

I’m overwhelmed with the effort you put into making my OS run! I really appreciate it! Will take some time to through it all in detail. But a lot of the partitions and filesystem parts of the OS was simply to be able to mount the image in Linux and copy over files. Initially my OS and bootloader didn’t need partitions. As you noticed currently the kernel is not part of the filesystem, but is prepended. The entire partition / boot system is very shaky, so a lot more work will have to go into making it stable. Thanks again for all your comments and efforts. Will try to implement and research as much as possible of the parts you touched on! Thanks!

I think the two best places to learn about it is the osdev forum and osdev wiki. There are so many useful resources to get you started there.

There are some tutorials out there too, but a lot of them have bugs and you basically recreate their OS.

Regarding studying opcodes, I never went that deep, closest I got was looking them up for my C compiler, so I know the most common basic ones.

https://forum.osdev.org/ https://wiki.osdev.org/Expanded_Main_Page

Oh, I really like UNIXes abstractions and use alot of them in my OS. What I meant was, because I use GCC for compiling, ld for linking, ar for archives etc, I noticed that I got really bound to the C way of UNIX. Or maybe POXIS would be more appropriate. It did “force” me into some design decisions which I did not like. Or even just the way I wrote C is so UNIX / Linux like. Wish I tried to branch out more, especially considering how different Windows C is.

There is no magic interaction between the compiler and OS. It simples compiles to the same machine code (i386) and uses interrupts for system calls. Structs are handled as a memory region with a size based on its members, and the member access is simply an offset into that region.

Current it has lots of limitations such as only int and char, no switch statements etc. The biggest change from default C, is allowing functions in structs and implicit passing a struct to a function if it’s a struct function. You can read more here:

https://github.com/joexbayer/C-Compiler

Thanks for the feedback! I think the biggest thing I’d do different is to have a plan. I just started out with the goal of doing the basic hello world OS, and that’s it. But then I kept adding new things, adding more and more working on multiple things at the same time. Which has lead to some technical debt I’m still trying to fix. I’d also try to be less UNIX dependent.

Regarding language, I love C for its basic syntax and “straight to the point” style. Maybe I’d consider some other languages for userspace applications.

A goal for me from the start was always that I wanted to write everything myself, no porting of any software, and for me that’s the entire point of the project. I mostly adhered to the rule of copy ideas not code.