All. This is not a trivial task, you need to learn most facets of the language, I would recommend looking up kernel programming. From the looks of it I would look up logical theories and paradigms for programming languages before embedding yourself in syntax. There are hardware layers and just so so much you will need to learn well more so than from an answer you are going to get on this site or by doing a google search.
Good Luck!