Routines 
Prev: 31844  Up: Map  Next: 31887 
Used by the routine at 31887, and also by the unused routines at 31893 and 31905. The event identifier in A (0, 712), taken modulo 8, corresponds to a bit in one of the bytes at 32640 (A<=7) or 32641 (A>=8). On exit, HL points to the appropriate byte and A holds the bit mask (single bit set), as follows:


31861  AND A  Set the carry flag if the event identifier is odd  
31862  RRA  
31863  LD E,A  Copy bits 13 of the event ID into bits 02 of E  
31864  LD A,0  A=1 if the event ID is an even number, 2 if it's an odd number  
31866  ADC A,A  
31867  INC A  
31868  RR E  Now bits 2 and 3 of the event ID are in bits 0 and 1 of E  
31870  JR NC,31874  Jump if the event ID is 0, 8, 9 or 12 (bit 1 reset)  
31872  ADD A,A  A=4 (event ID = 10) or 8 (event ID = 7 or 11)  
31873  ADD A,A  
31874  SCF  
31875  RR E  E=128 (event ID <= 7) or 129  
31877  JR NC,31883  Jump if the event ID is 0, 8, 9, 10 or 11 (bit 2 reset)  
31879  ADD A,A  A=16 (event ID = 12) or 128 (event ID = 7)  
31880  ADD A,A  
31881  ADD A,A  
31882  ADD A,A  
31883  LD D,127  HL=32640 or 32641  
31885  EX DE,HL  
31886  RET 
Prev: 31844  Up: Map  Next: 31887 