Prev: 41557 Up: Map Next: 41720
41661: Routine at A2BD
Used by the routine at 45598.
41661 LD HL,56812 HL=56812.
41664 LD A,(23672) E=FRAMES.
41667 LD E,A
41668 LD A,(38547) A=CounterLow.
41671 AND %00011111 Keep only bits 0-4.
41673 LD D,A Store the result in D.
41674 LD BC,512 BC=0512.
41677 LD A,(DE)
41678 INC DE
41679 CP 128
41681 JR C,41692
41683 LD (HL),0
41685 INC HL
41686 DEC BC
41687 LD A,B
41688 OR C
41689 JR NZ,41677
41691 RET Return.
41692 PUSH BC
41693 LD A,C
41694 RRCA
41695 RRCA
41696 AND %11000000 Keep only bits 6-7.
41698 LD C,A
41699 LD A,(38549)
41702 AND %00001111 Keep only bits 0-3.
41704 OR C
41705 LD (HL),A
41706 INC HL
41707 LD A,R
41709 LD C,A
41710 LD A,(38549) A=38549.
41713 ADD A,C
41714 LD (38549),A
41717 POP BC
41718 JR 41686 Jump to 41686.
Prev: 41557 Up: Map Next: 41720