The pad
| ESC$10 | INS$11 | PGUP$12 | A$13 |
| ▲$14 | DEL$15 | PGDN$16 | B$17 |
| 7$07 | 8$08 | 9$09 | C$0F |
| 4$04 | 5$05 | 6$06 | D$0E |
| 1$01 | 2$02 | 3$03 | E$0D |
| ◄$00 | 0$0A | ►$0B | F$0C |
Twenty-four keys, and every one of them is a number underneath: the encoder hands the
PIA a five-bit code, $00 to $17, and the monitor decides what
it means.
What each key does
| Key | Function |
| 0 – F | Shift a hex digit in — into the address while navigating, into the byte while editing |
| ◄ / ► | Step the address back or on by one |
| PGUP / PGDN | Step the address by $0100 |
| INS | Switch between reading memory and editing it |
| DEL | Write $00 at the current address |
| ▲ | Run the code at the current address. It comes back on RTS |
| ESC | Stop a running program and return to the monitor |
Every code, in order
| Code | PA4…PA0 | Key | LCD | Hex value |
| $00 | 0 0 0 0 0 | ◄ | < | — |
| $01 | 0 0 0 0 1 | 1 | 1 | 1 |
| $02 | 0 0 0 1 0 | 2 | 2 | 2 |
| $03 | 0 0 0 1 1 | 3 | 3 | 3 |
| $04 | 0 0 1 0 0 | 4 | 4 | 4 |
| $05 | 0 0 1 0 1 | 5 | 5 | 5 |
| $06 | 0 0 1 1 0 | 6 | 6 | 6 |
| $07 | 0 0 1 1 1 | 7 | 7 | 7 |
| $08 | 0 1 0 0 0 | 8 | 8 | 8 |
| $09 | 0 1 0 0 1 | 9 | 9 | 9 |
| $0A | 0 1 0 1 0 | 0 | 0 | 0 |
| $0B | 0 1 0 1 1 | ► | > | — |
| $0C | 0 1 1 0 0 | F | F | 15 |
| $0D | 0 1 1 0 1 | E | E | 14 |
| $0E | 0 1 1 1 0 | D | D | 13 |
| $0F | 0 1 1 1 1 | C | C | 12 |
| $10 | 1 0 0 0 0 | ESC | * | — |
| $11 | 1 0 0 0 1 | INS | I | — |
| $12 | 1 0 0 1 0 | PGUP | U | — |
| $13 | 1 0 0 1 1 | A | A | 10 |
| $14 | 1 0 1 0 0 | ▲ | ^ | — |
| $15 | 1 0 1 0 1 | DEL | X | — |
| $16 | 1 0 1 1 0 | PGDN | N | — |
| $17 | 1 0 1 1 1 | B | B | 11 |
The code is not the value. Nowhere do the two line up: key
0 is code $0A, and C to F run
backwards — $0C is F and $0F is
C. The encoder numbers the switches in the order they sit on the board,
and the firmware's lookup table turns that into a digit. Read a code off the bus and
you must look it up; there is no arithmetic that gets you there.
How a press gets to the CPU
An MM74C922 encoder scans the pad — sixteen keys natively,
extended to twenty-four with a 74HC00 — and raises
data-available on the PIA's CA1. That fires an interrupt, the handler
reads the five-bit code off PA0–PA4, and
CA2 drops the encoder's output enable again. So no press is ever missed,
and the monitor is never sitting in a polling loop.
The same 65C21 PIA drives the LCD: Port A's top three lines are RS,
R/W and E, and Port B is the display's data bus.