Prev: B293 Up: Map Next: B2C0
B2A4: Routine at B2A4
Used by the routine at B208.
B2A4 PUSH BC Stash BC and DE on the stack.
B2A5 PUSH DE
B2A6 INC HL Increment HL by one.
B2A7 LD A,(HL) A=*HL.
B2A8 XOR %00000100 Flip bit 2.
B2AA LD (DE),A Write A to *DE.
B2AB DEC HL Decrease HL by one.
B2AC DEC DE Decrease DE by one.
B2AD LD A,(HL) A=*HL.
B2AE LD (DE),A Write A to *DE.
B2AF INC HL Increment HL by two.
B2B0 INC HL
B2B1 DEC DE Decrease DE by one.
B2B2 DEC C Decrease C by one.
B2B3 JR NZ,$B2A6 Jump to B2A6 until C is zero.
B2B5 EX DE,HL Exchange the DE register with the shadow HL register.
B2B6 POP HL Restore HL from the stack.
B2B7 LD BC,$0040 HL+=0040.
B2BA ADD HL,BC
B2BB EX DE,HL Exchange the DE register with the shadow HL register.
B2BC POP BC Restore BC from the stack.
B2BD DJNZ $B2A4 Decrease counter by one and loop back to B2A4 until counter is zero.
B2BF RET Return.
Prev: B293 Up: Map Next: B2C0