Prev: 25427 Up: Map Next: 25489
25478: Delay Loop
Used by the routines at GameOver, HandlerCup and DisplayNightDriver.
A pure delay. HL counts down from zero, round through 65535 back to zero again, and this is repeated B times.
Input
B Number of times to execute the delay
Delay 25478 LD HL,0 Set the delay counter to 0 which counts down through 65535.
From HL being set above (and for each loop), decrementing 0000 by one gives 65535.
Delay_Loop 25481 DEC HL Decrease the delay counter by one.
25482 LD A,L Loop back to Delay_Loop until the delay counter is zero.
25483 OR H
25484 JR NZ,Delay_Loop
25486 DJNZ Delay_Loop Decrease the repeat count by one and loop back to Delay_Loop until the delay has been repeated B times.
25488 RET Return.
View the equivalent code in;
Prev: 25427 Up: Map Next: 25489