8 ms·
Very, very interesting deep dive. I reminds me of the nand2tetris.org course, which does something very similar (albeit for a toy hardware/OS/language): explai
by SilasX 8y ago
Very, very interesting deep dive. I reminds me of the nand2tetris.org course, which does something very similar (albeit for a toy hardware/OS/language): explain what the heck is going on between a print command and something being written to the screen.
In nand2tetris, they work from a hardware simulation that represents memory where a block of that memory determines what the pixels on the screen are set to. Then you write code that can turn the pixels on or off, then a character OS library that converts binary ascii values into a combination of pixel settings that display a character.
Then you implement your OS's program loop (the "OS" is based around a one-shot "here a bunch of functions, run from an entry point" that you have to specify each time you turn it on) which has a specified entrypoint from which the rest is called.
Obviously, modern systems are a lot faster, but it was a great illustration of what has to happen in between, which this article is doing for real OSes.