Prev: EBCD Up: Map Next: EC39
EBF5: Input Handler: Common
Handle game controls which are common across all input control routines.
InputHandler_Common EBF5 POP IX Housekeeping; see Handler_PlayerInput. Restore IX and HL from the stack.
EBF7 POP HL
EBF8 LD A,($D838) Jump to Common_Continue if bit 7 of *Bomb is set.
EBFB BIT 7,A
EBFD JR NZ,Common_Continue
Handler for HOLD ("H").
EBFF LD A,$BF Read from the keyboard;
Port Number Bit
0 1 2 3 4
BF ENTER L K J H
EC01 IN A,($FE)
EC03 RRA Jump to Common_CheckAbort if "H" (hold) is not being pressed.
EC04 RRA
EC05 RRA
EC06 RRA
EC07 RRA
EC08 JR C,Common_CheckAbort
EC0A LD A,R A=the contents of the Memory Refresh Register.
EC0C PUSH AF Stash AF on the stack.
EC0D DI Disable interrupts.
Handler for CONTINUE ("J").
Common_CheckContinue EC0E LD A,$BF Read from the keyboard;
Port Number Bit
0 1 2 3 4
BF ENTER L K J H
EC10 IN A,($FE)
EC12 RRA Jump to Common_CheckContinue if "J" (continue) is not being pressed.
EC13 RRA
EC14 RRA
EC15 RRA
EC16 JR C,Common_CheckContinue
EC18 POP AF Restore AF from the stack.
EC19 JP PO,Common_CheckAbort Jump to Common_CheckAbort if is odd.
EC1C EI Enable interrupts.
Handler for ABORT ("R" and "T" together).
Common_CheckAbort EC1D LD A,$FB Read from the keyboard;
Port Number Bit
0 1 2 3 4
FB Q W E R T
EC1F IN A,($FE)
EC21 RRA Jump to Common_Continue if "R" (abort game - first key) is not being pressed.
EC22 RRA
EC23 RRA
EC24 RRA
EC25 JR C,Common_Continue
EC27 RRA Jump to Common_Continue if "T" (abort game - second key) is not being pressed.
EC28 JR C,Common_Continue
Initiate a game abort, do some housekeeping.
EC2A POP IY Restore IY from the stack FOUR times.
EC2C POP IY
EC2E POP IY
EC30 POP IY
EC32 JP Game_Loop Jump to Game_Loop.
Load the control byte into the accumulator for the return to the calling routine.
Common_Continue EC35 LD A,($E5B2) A=*Data_Control.
EC38 RET Return.
Prev: EBCD Up: Map Next: EC39