Reading the keyboard

I’ve finally started writing the console. The first task is to read the keyboard. This is done by polling eight different I/O addresses and seeing which bits are cleared to determine which of 40 keys has been pressed. One of those keys is the shift key, which modifies the number keys to do things like backspace and the cursors. Depending on the bit set I’ll end up with a number for each row of 16, 8, 4, 2, or 1, which I then have to convert into a value in the key look-up table. Ideally I want the routine to place the key read in the accumulator without storing anything in memory. This will take some more thought.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.