Prev: B399 Up: Map Next: B3DA
B3C1: Converts the standard I/O port / address keyboard values into the equivalent ASCII value.
Used by the routines at Game_InputSetKeys, Menu_UpdateKeys and MainMenu.
Input
A Key scan value.
C Port address of key row.
Output
Game_InputAsAscii B3C1 PUSH DE
B3C2 PUSH HL
B3C3 PUSH AF
B3C4 LD DE,$0005 Number of keys per row.
B3C7 LD A,C
B3C8 LD HL,Game_InputAsciiTablePtr Table holding conversions.
Game_InputAsAscii_0 B3CB ADD HL,DE Find address in table of corrisponding key row.
B3CC RL A
B3CE JR C,Game_InputAsAscii_0
B3D0 POP AF
Game_InputAsAscii_1 B3D1 INC HL Shift address onto key in row.
B3D2 RR A
B3D4 JR C,Game_InputAsAscii_1
B3D6 LD A,(HL) Get ZX-ASCII value of key on that row.
B3D7 POP HL
B3D8 POP DE
B3D9 RET
Prev: B399 Up: Map Next: B3DA