[5] It was never released by Microsoft, but Midori OS had some fascinating ideas like software isolated processes, asynchronous message passing and object capabilities. Nice write-up about the project by Joe Duffy here http://joeduffyblog.com/2015/11/03/blogging-about-midori/
The osdev wiki has a barebones example for a few languages. However, they're all x86 centered and literally just get you booted to a main entrypoint. Which, arguably, is about as far as they should since osdev takes quite a bit of dedication and research.