Prev: B6BB Up: Map Next: B6E5
B6BF: Handler: Controls Keyboard
Used by the routine at Handler_Controls.
Input
E Control response
"Left" is handled by a different port to the other control keys.
Handler_Controls_Keyboard B6BF LD BC,$F7FE Read from the keyboard;
Port Number Bit
0 1 2 3 4
F7 1 2 3 4 5
B6C2 IN A,(C)
Handles "left" action.
B6C4 LD E,$10 E=10.
B6C6 BIT 4,A Return if "5" (left) was pressed.
B6C8 RET Z
Handle "right", "down", "up" and "fire".
B6C9 LD BC,$EFFE Read from the keyboard;
Port Number Bit
0 1 2 3 4
EF 0 9 8 7 6
B6CC IN A,(C)
Handles "right" action.
B6CE LD E,$00 E=00.
B6D0 BIT 2,A Return if "8" (right) was pressed.
B6D2 RET Z
Handles "down" action.
B6D3 LD E,$08 E=08.
B6D5 BIT 4,A Return if "6" (down) was pressed.
B6D7 RET Z
Handles "up" action.
B6D8 LD E,$18 E=18.
B6DA BIT 3,A Return if "7" (up) was pressed.
B6DC RET Z
Handles "fire" action.
B6DD LD E,$80 E=80.
B6DF BIT 0,A Return if "0" (fire) was pressed.
B6E1 RET Z
Handle no action.
B6E2 LD E,$C0 E=C0.
B6E4 RET Return.
Prev: B6BB Up: Map Next: B6E5