Routines 
Prev: 24794  Up: Map  Next: 24823 
Used by the routine at start.


dec_timer_move_aliens  24795  LD A,(_ALIENS_SPEED_CONTROL)  Pick up speed control, decrement it, if it's not zero it's not yet time to move the aliens.  
24798  DEC A  
24799  LD (_ALIENS_SPEED_CONTROL),A  
24802  RET NZ  
24803  CALL move_aliens  Move aliens, drop through  
Aliens have been moved, now recalculate speed control based on how many are left. This puts a number in _ALIENS_SPEED_CONTROL. The algorihm is SPEED_CONTROL = (NUM_LEFT/4 + NUM_LEFT/8) + 4
This entry point is used by the routine at start.


set_alien_speed  24806  LD A,(_NUM_ALIENS_REMAINING)  How many are left?  
24809  SRL A  /2  
24811  SRL A  /4  
24813  LD B,A  Div by 4 in B  
24814  SRL A  /8  
24816  ADD A,B  div8 + div4  
24817  ADD A,4  +4  
24819  LD (_ALIENS_SPEED_CONTROL),A  Result  
24822  RET 
Prev: 24794  Up: Map  Next: 24823 