A few years ago I was taking a course on operating systems. As a way to understand more of the basics around processors and machine code, I wrote a very simple "starfield" in Assembly for the Commodore 64.
This is an older reverse engineering project I did. I wrote about it for Rana Makerspace, and decided to make another post with more of the technical details.
When using a microcontroller to read something with lots of inputs, like a keyboard, there aren't enough IO pins to give one to every input. You have to turn to tricks like multiplexing.