Live data from Hacker News

Kernel 101 – Let’s write a Kernel

arjunsreedharan.org

1–10 of 104 posts

Re: Kernel 101 – Let’s write a Kernel

#2
Neat read so far! Not done yet, but I think I've found a small error in kernel.c: the attribute byte of the characters in "my first kernel" should be set to 0x02, not 0x07.

edit: I misread. 0x07 is intentional, 0x02 was mentioned as an alternative. Good post!

Re: Kernel 101 – Let’s write a Kernel

#4
post #2

Neat read so far! Not done yet, but I think I've found a small error in kernel.c: the attribute byte of the characters in "my first kernel" should be set to 0x02, not 0x07. edit: I misread. 0x07 is intentional, 0x02 was mentioned as an alternative. Good post!

Not an error. 0x02 means green character on black background. 0x07 means light grey character on black bg. It's explained with one, and coded with another.

Re: Kernel 101 – Let’s write a Kernel

#8
post #5

I'm not exactly Linus Torvalds but I'm pretty sure a program that prints one line of text is not "a kernel". :)

I'm going to give OP the benefit of the doubt on this one. A couple things worth noting, it successfully boots, does not cause a fault of any kind, and is in a position to interact directly with the bare metal. The tools that we use to interact with a *nix system are often just that, bits of code in user-space. This is a kernel-space program. That it does not do any of the memory management or device access yet doesn't mean it's not a kernel.

It might actually be interesting to take these techniques and apply them to something else. Maybe a demo, ala the demoscene, that runs on the bare metal. Maybe implement a game that doesn't have the overhead of an os.

This is less a finished product and more an inspiration. So often I think that people miss that about things. Sometimes things aren't done, sometimes they're just beginning.

Re: Kernel 101 – Let’s write a Kernel

#9
post #2

Neat read so far! Not done yet, but I think I've found a small error in kernel.c: the attribute byte of the characters in "my first kernel" should be set to 0x02, not 0x07. edit: I misread. 0x07 is intentional, 0x02 was mentioned as an alternative. Good post!

uaygsfdbzf: your account is marked dead it seems, so most of us can't see what you write.

Here's what he posted:

Not an error. 0x02 means green character on black background. 0x07 means light grey character on black bg. It's explained with one, and coded with another.

Post reply on HN