Prev: B774 Up: Map Next: B7A3
B787: Advance the timer by one minute
Used by the routine at B770.
B787 LD HL,$A429 Last digit of timer
B78A LD B,$04 Number of digits to update
B78C LD A,(HL) Get next digit
B78D INC A Increment it
B78E LD (HL),A Set it
B78F BIT 0,B Are we handling the minutes digit?
B791 JR Z,$B795 Move on if not
B793 ADD A,$04 Adjust 60 -> 00 for minutes in the hour
B795 CP $3A Have we overflowed past 9?
B797 JR C,$B7A3 Jump forward if we haven't
B799 LD (HL),$30 Put '0' in this column
B79B DEC HL Move to next column
B79C BIT 0,B Are we handling minutes?
B79E JR Z,$B7A1 Move on if not
B7A0 DEC HL After minutes, skip one column for hours
B7A1 DJNZ $B78C Loop back for next digit
Prev: B774 Up: Map Next: B7A3