In the source, you see for example:
BIT SAD
BNE TTYKB
TTYKB keyboard and display
So if bit 0 of Port A (PA0 of SAD) is low, the KIM-1 defaults to the LED display and Keyboard interface.
To enable a keyboard, one must have a switch between PIN 21 and Pin V on the application connector.

The 74145 decodes PB1 to PB4 to an output. PB1 is connected to Input a, PB2 to B, PB3 to C and PB4 to D.


In the INIT routine you see Port A Data Direction loaded to 0, which means PA0 to PA7 are inputs.
Port B Datadirection is loaded with $3F, so PB0 to PB5 are outputs.
Next $07 is stored at Port B data, so PB1, PB2 are low, and PB3 and PB4 high. This means output O3, Row 3, is low.

