Prev: BD38 Up: Map Next: BD6B
BD58: Is the pick-up control pressed?
Used by the routine at TAKE_OR_LEAVE.
The pick-up bit is bit 4 of INPUT, except with a joystick and bit 3 of CONTROL (directional control) set, when it is taken from bit 5: then a joystick's down is a direction, and READ_CONTROLS sets bit 5 from any key but the number keys, CAPS SHIFT and SPACE instead. As Knight Lore's chk_pickup_drop.
Output
F Z clear if it is
A bit 4 set if it is
CHK_PICKUP_DROP BD58 LD HL,CONTROL the method, bits 1-2 of CONTROL
BD5B LD A,(HL)
BD5C AND $06
BD5E LD A,(INPUT) this turn's controls; the keyboard: bit 4 as it is
BD61 JR Z,CHK_PICKUP_DROP_0
BD63 BIT 3,(HL) a joystick without directional control: bit 4 as it is
BD65 JR Z,CHK_PICKUP_DROP_0
BD67 RRCA a joystick with it: bit 5 moves into bit 4
CHK_PICKUP_DROP_0 BD68 AND $10 the pick-up bit
BD6A RET
Prev: BD38 Up: Map Next: BD6B