Prev: BFDB Up: Map Next: C00E
BFFB: Test Pickup Drop Key
Used by the routine at HandlePickupAndDrop.
Tests whether the control for picking up or dropping an object is pressed. If the joystick is used with the directional control, the other of the two bits for this is used.
Output
F Zero flag set if the control is not pressed
Choose the pickup bit, then test whether it is pressed.
TestPickupDropKey BFFB LD HL,$5BA4 Point HL at the control method, ControlMethod.
BFFE LD A,(HL) Fetch it.
BFFF AND %00000110 Keep the choice of joystick.
C001 LD A,($5BB5) Fetch the controls that are pressed from ControlsPressed.
C004 JR Z,TestPickupDropKey_Test Jump to TestPickupDropKey_Test if the keyboard is in use.
C006 BIT 3,(HL) Jump to TestPickupDropKey_Test if the directional control is not on.
C008 JR Z,TestPickupDropKey_Test
C00A RRCA Move the bit for the directional control into place.
TestPickupDropKey_Test C00B AND %00010000 Keep the bit for picking up and dropping.
C00D RET Return.
View the equivalent code in;
Prev: BFDB Up: Map Next: C00E