Prev: 37720 Up: Map Next: 37784
37771: Read Pickup Key
Used by the routine at DrawRoom.
Reads the key to pick up an item, which is CAPS SHIFT or SPACE, and Z or SYMBOL SHIFT. The result is stored in PickupPressed.
ReadPickupKey 37771 LD A,126 Read from the keyboard;
Port Number Bit
0 1 2 3 4
126 CAPS SHIFT / SPACE Z / SYMBOL SHIFT X / M C / N V / B
37773 OUT (253),A
37775 IN A,(254)
37777 CPL Flip the bits, so that a set bit is a key which is pressed.
37778 AND %00000010 Keep only bit 1.
37780 LD (24096),A Update the pickup pressed flag in PickupPressed.
37783 RET Return.
Prev: 37720 Up: Map Next: 37784