Difference between revisions of "Keyboard"
From SpecNext official Wiki
m (6 revisions imported) |
(info about multi-row reading possible) |
||
Line 8: | Line 8: | ||
}} | }} | ||
Reads keys on the keyboard depending on the upper byte of the port number. The five keys are represented by bits 0-4 of the read byte, listed below with bit 4 first down to bit 0. A zero means that the key is pressed. | Reads keys on the keyboard depending on the upper byte of the port number. The five keys are represented by bits 0-4 of the read byte, listed below with bit 4 first down to bit 0. A zero means that the key is pressed. | ||
+ | |||
+ | The top eight bits of the port address are active low signals that select one or more key rows for reading. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! Port upper byte !! Keys affected | + | ! Port upper byte !! Keys affected (row of keys) |
|- | |- | ||
− | | $7F || B, N, M, Symbol Shift, Space | + | | $7F (bit 7) || B, N, M, Symbol Shift, Space |
|- | |- | ||
− | | $BF || H, J, K, L, Enter | + | | $BF (bit 6) || H, J, K, L, Enter |
|- | |- | ||
− | | $DF || Y, U, I, O P | + | | $DF (bit 5) || Y, U, I, O P |
|- | |- | ||
− | | $EF || 6, 7, 8, 9, 0 | + | | $EF (bit 4) || 6, 7, 8, 9, 0 |
|- | |- | ||
− | | $F7 || 5, 4, 3, 2, 1 | + | | $F7 (bit 3) || 5, 4, 3, 2, 1 |
|- | |- | ||
− | | $FB || T, R, E, W, Q | + | | $FB (bit 2) || T, R, E, W, Q |
|- | |- | ||
− | | $FD || G, F, D, S, A | + | | $FD (bit 1) || G, F, D, S, A |
|- | |- | ||
− | | $FE || V, C, X, Z, Caps Shift | + | | $FE (bit 0) || V, C, X, Z, Caps Shift |
|} | |} | ||
[[File:Speckeys.png]] | [[File:Speckeys.png]] |
Revision as of 08:27, 31 December 2019
Number | $**FE |
---|---|
Decimal | |
Short desc. | Series of specific ports that read keyboard key presses. |
Bit Mask | %xxxx xxxx ---- ---0 where only one bit in x is 0 |
Readable | Yes |
Writable | No |
Subsystem | Input |
Reads keys on the keyboard depending on the upper byte of the port number. The five keys are represented by bits 0-4 of the read byte, listed below with bit 4 first down to bit 0. A zero means that the key is pressed.
The top eight bits of the port address are active low signals that select one or more key rows for reading.
Port upper byte | Keys affected (row of keys) |
---|---|
$7F (bit 7) | B, N, M, Symbol Shift, Space |
$BF (bit 6) | H, J, K, L, Enter |
$DF (bit 5) | Y, U, I, O P |
$EF (bit 4) | 6, 7, 8, 9, 0 |
$F7 (bit 3) | 5, 4, 3, 2, 1 |
$FB (bit 2) | T, R, E, W, Q |
$FD (bit 1) | G, F, D, S, A |
$FE (bit 0) | V, C, X, Z, Caps Shift |