
Kernels 101 – Let’s write a Kernel (2014) - buzzfeedaccount
https://arjunsreedharan.org/post/82710718100/kernels-101-lets-write-a-kernel
======
fwsgonzo
I made a barebones beginner repo as well, but with all the glue solved for C
and C++ (no exceptions and rtti, although that is certainly possible too):
[https://github.com/fwsGonzo/barebones](https://github.com/fwsGonzo/barebones)

While writing a bootloader is fun, there is a lot of old things that you can
only solve by having thousands of people use your loader. Hence, we turn to
multiboot - which also allows us to boot on google cloud and many other cool
places.

I read the tutorial and its quite well written. One nit pick is that the stack
pointer is just set to a value that a beginner won't understand - namely the
end of the 8kb BSS area. Additionally, the BSS area is not zeroed, which has
to be done at some point, so there is potential for problems down the road.

On i386 and amd64 the stack grows downwards, so we should be setting our stack
pointer to the 16-byte aligned (due to SSE) end of our stack area.

