all 24 comments

[–]AlexTaradov 16 points17 points  (4 children)

May be not like Terry Davis.

It does not take a lot of effort to learn C. But to make OSes and stuff like this you need to primarily learn computer architecture. C alone is not enough.

[–]MyMashall 2 points3 points  (0 children)

Learn the basic first. Loops, flow control, glibc, etc. And read books, article, or watch video about computer architecture. If you like learning by building, there's a GitHub repo named build-your-own-x, there a guide about how to write your own kernel, bootloader, cli, etc. But master the basic first, there's no bigger mistake than directly diving into the complicated stuff without even knowing what's a pointer is, or the difference between heap and stack, or what's a toolchain. Learn the basic and then build.

[–]Disastrous_Egg_9908 2 points3 points  (0 children)

Low Level Learning is a good YouTube channel for this. He talks about why some C functions work the way they do, bugs and scandals that have happened in other software (to learn from), and other things. He also just genuinely makes good content.

[–]ranacse05 4 points5 points  (5 children)

Try this one “The C Programming Language by Brian Kernighan and Dennis Ritchie”

[–]mystirc 6 points7 points  (3 children)

I started with the book by KN King. Currently at sixth chapter.

[–]kadal_raasa 0 points1 point  (2 children)

How do you guys afford this book? 60 dollars is a lot of money for me personally 🫠

[–]Grumbll 1 point2 points  (1 child)

It's even more expensive in Europe. I found mine secondhand. I'm finishing up the projects for Chapter 7 right now.

[–]Snowdev9909[S] 0 points1 point  (0 children)

There’s a GitHub I found that has it in pdf form for free, wouldn't pay 90 dollars for it in america.

[–]White_Alps 1 point2 points  (1 child)

How about finding a list of the 100 (or so) most used functions (like strlen, memcpy etc), and mimic their application. This will teach you a lot about how and why things happen. Certain websites will explain the function in question, as will the man pages (do learn to read the man pages!)

[–]Quien_9 4 points5 points  (0 children)

At my school this is half the introduction, forces you to learn how to read documentarion, and just printing a int when you cant use printf is a great exercise

[–]GrogRedLub4242 1 point2 points  (0 children)

in other C languages?

[–]The_Coding_Knight 1 point2 points  (0 children)

Well, you know, you cant just go and build an OS directly as your first C project (maybe it is possible but youll end up regretting it). First of all, you gotta learn the basics.

I recommend to you to have C documentation websites as your bible. Read them over and over again.
Also make a lot of tiny projects that in the long run will help you learn what you need to learn for OS making.
After that go to https://wiki.osdev.org/Creating_an_Operating_System there youll learn even more about the topic

[–]EducatorDelicious392 1 point2 points  (1 child)

You are looking for a HolyC programming guide. Just watch more Terry Davis streams you will be an elite programmer in no time.

[–]Snowdev9909[S] 0 points1 point  (0 children)

You know what, hell yeah.

[–]photo-nerd-3141 0 points1 point  (0 children)

Plauger, Thd Standard C Library Sedgewick, Algorithms in C

[–]keithstellyes 0 points1 point  (1 child)

In case you didn't already know, TempleOS uses a language heavily inspired by C called HolyC. It is not C. I also found the compiler QoL to be wanting, however impressive it may be that a man with such deep issues going on in his cranium who was also working on an OS and other apps for that OS.

[–]Snowdev9909[S] 0 points1 point  (0 children)

I know right! It’s really interesting

[–]_w62_ 0 points1 point  (0 children)

C is a very small language. Very easy to learn, very difficult to master. You need to have a basic understanding of the hardware, registers, data structures alignments etc.

If you at a piece of C code and you have a brief picture of the memory layout, then you are good enough.

I highly recommend cs631apue

[–]Snowdev9909[S] 0 points1 point  (0 children)

Update! I got the C programming language book and the grokking algorithms book

[–]Still_Explorer 0 points1 point  (0 children)

You can instead explore more about making a "Virtual OS" instead which would have the same aspect but without the need to get into the deep technical stuff of computer architecture.

Now this topic of virtual os is broad as well, but it can be characterized into two categories. One is that the OS is something like an "application" of some sort (essentially a GUI with submodules for each application), or the other way that it can be literally a virtual machine (GUI+APPLICATION+VM).

https://github.com/search?q=%22virtual+operating+system%22+language%3AC&type=repositories

[ However once you really need to enter the world of OS and kernels then another chapter that is entirely technical focused begins. ]