Prev: A255 Up: Map Next: A2F8
A2BD: Routine at A2BD
Used by the routine at B21E.
A2BD LD HL,$DDEC HL=DDEC.
A2C0 LD A,($5C78) E=FRAMES.
A2C3 LD E,A
A2C4 LD A,($9693) A=CounterLow.
A2C7 AND %00011111 Keep only bits 0-4.
A2C9 LD D,A Store the result in D.
A2CA LD BC,$0200 BC=0200.
A2CD LD A,(DE)
A2CE INC DE
A2CF CP $80
A2D1 JR C,$A2DC
A2D3 LD (HL),$00
A2D5 INC HL
A2D6 DEC BC
A2D7 LD A,B
A2D8 OR C
A2D9 JR NZ,$A2CD
A2DB RET Return.
A2DC PUSH BC
A2DD LD A,C
A2DE RRCA
A2DF RRCA
A2E0 AND %11000000 Keep only bits 6-7.
A2E2 LD C,A
A2E3 LD A,($9695)
A2E6 AND %00001111 Keep only bits 0-3.
A2E8 OR C
A2E9 LD (HL),A
A2EA INC HL
A2EB LD A,R
A2ED LD C,A
A2EE LD A,($9695) A=9695.
A2F1 ADD A,C
A2F2 LD ($9695),A
A2F5 POP BC
A2F6 JR $A2D6 Jump to A2D6.
Prev: A255 Up: Map Next: A2F8