Prev: B7BA Up: Map Next: B82B
B7F9: Routine at B7F9
Used by the routine at F177.
B7F9 PUSH AF Stash AF, HL, BC and DE on the stack.
B7FA PUSH HL
B7FB PUSH BC
B7FC PUSH DE
B7FD EX DE,HL Switch the DE and HL registers.
B7FE PUSH HL Stash HL on the stack.
B7FF LD D,$FD D=FD.
B801 LD E,L E=L.
B802 LD L,H L=H.
B803 LD H,$00 H=00.
B805 ADD HL,HL HL*=(20)+DE.
B806 ADD HL,HL
B807 ADD HL,HL
B808 ADD HL,HL
B809 ADD HL,HL
B80A ADD HL,DE
B80B LD (HL),C Write C to *HL.
B80C POP HL Restore HL from the stack.
B80D LD DE,$5300 HL+=5300.
B810 ADD HL,DE
B811 EX DE,HL Switch the DE and HL registers.
B812 LD L,A Create an offset in HL.
B813 LD H,$00
B815 ADD HL,HL HL*=08.
B816 ADD HL,HL
B817 ADD HL,HL
B818 LD BC,($B7E9) HL+=*B7E9.
B81C ADD HL,BC
B81D LDI Write *HL to *DE, increment both DE and HL by one, and decrease BC by one.
B81F DEC E Decrease B by one.
B820 LD A,E E+=20.
B821 ADD A,$20
B823 LD E,A
B824 JR NC,$B81D
B826 POP DE Restore DE, BC, HL and AF from the stack.
B827 POP BC
B828 POP HL
B829 POP AF
B82A RET Return.
Prev: B7BA Up: Map Next: B82B