Prev: 37876 Up: Map Next: 37928
37884: Capture keyboard input
Used by the routine at 37876.
Input
HL 23485 (store for currently active keyboard press / joystick action)
Output
A Stored key-press (bits: 0=LEFT, 1=RIGHT, 2=UP, 3=DOWN, 4=FIRE)
37884 LD C,254 IN 65022 reads the half row A to G...
37886 LD B,253 ...
37888 IN A,(C) Read keyboard
37890 BIT 0,A "A" key pressed so...
37892 CALL Z,38066 ...store an UP input from control device
37895 INC B IN 65278 reads the half row CAPS SHIFT to V
37896 IN A,(C) Read keyboard
37898 BIT 1,A "Z" key pressed so...
37900 CALL Z,38069 ...store a DOWN input from control device
37903 LD B,127 IN 32766 reads the half row SPACE to B
37905 IN A,(C) Read keyboard
37907 BIT 3,A "N" key pressed so...
37909 CALL Z,38060 ...store a LEFT input from control device
37912 IN A,(C) Read keyboard
37914 BIT 2,A "M" key pressed so...
37916 CALL Z,38063 ...store a RIGHT input from control device
37919 IN A,(C) Read keyboard
37921 BIT 0,A SPACE bar pressed so...
37923 CALL Z,38072 ...store a FIRE input from control device
37926 LD A,(HL) Return stored key-press in A
37927 RET Return
Prev: 37876 Up: Map Next: 37928