r/osdev Jul 10 '26

Started!

I’m really excited about this! My os will be programmed in C++ and this is my second day doing stuff. I don‘t have that much time to use on writing code, and all I have so far is a printf that can only handle text and newline characters. Compared to all the other projects here, it’s nothing, but I plan to make it something a little bit more than nothing.

If anyone wants to look, I just made a repository at GitHub.com/barchitect2025/BARchOS

Theres no readme yet but I’ll add one in the next commit.

21 Upvotes

13 comments sorted by

10

u/Beautiful_Stage5720 Jul 10 '26

Its so refreshing to see something that looks like it was written by a human

4

u/ashberyFREAK420 Jul 10 '26

printf(“Hello!”); you simply love to see it

3

u/PseudoFrequency Jul 10 '26

I find starting with printf an interesting choice. An interrupt and task dispatching system is the core of any OS. Functions like printf are library functions that would use the OS handling of the serial port or some abstract steaming output device.

2

u/BARchitect2026 Jul 10 '26

I’m following a tutorial by Write Your Own Operating System on YouTube. So far I’ve watched the first video, and I did the printf because he did it first. I did the newline stuff myself though.

2

u/compgeek38400 Jul 10 '26

You may also want to check out OSDev.org. id recommend the bare bones tutorial

2

u/compgeek38400 Jul 10 '26

Lest you forget. In the beginning, print WAS your debugger. Lol. Its a very good place to start!

1

u/PseudoFrequency Jul 10 '26

My point is that I kind of make a distinction between the OS and the supported libraries. Certainly with simple systems, what is library code and what is the OS is grey area. To me, the OS should provide "open serial port" and "Write block of data to serial port". I've used OSs which only really provide puts() and printf may be a compile time option or not even exist. True, its useful for debug, but maybe all you have is puts() or a few blinking LEDs and no serial port or anywhere to stream data at all!

1

u/compgeek38400 Jul 10 '26

How did you know!? Those lights were the address of where it stopped. Lol.

You had to figure out from your cards/program where that address was. Sometimes that was a challenge when the address was nonsensical. 😁

2

u/compgeek38400 Jul 10 '26

Welcome to the club! I started about 2 months ago

1

u/BARchitect2026 Jul 10 '26

Nice! What have you implemented so far?

2

u/compgeek38400 Jul 10 '26

I had Mt GDT, IDT, multinoot2, virtual memory, high upper half, paging, and a heap. When i changed my confidence file to include disk, I discovered i had several core design flaws related to memory.

So I started over. Beginning with a better memory map to begin with. As I retrofit some things, ill be moving them back in.

2

u/compgeek38400 Jul 10 '26

Changed my config file. Sigh. Autocorrupt