Prev: A817 Up: Map Next: A86E
A83F: Routine at A83F
Used by the routine at DrawRoom.
A83F PUSH AF Stash AF, BC, DE and HL on the stack.
A840 PUSH BC
A841 PUSH DE
A842 PUSH HL
A843 DEC A Decrease A by one.
A844 LD ($BAA2),A Write A to *BAA2.
A847 LD A,E Write E to *BAA3.
A848 LD ($BAA3),A
A84B LD A,($BAA3) E=*BAA3.
A84E LD E,A
A84F PUSH BC Stash BC and DE on the stack.
A850 PUSH DE
A851 CALL $A86E Call A86E.
A854 POP DE Restore DE and BC from the stack.
A855 POP BC
A856 LD A,($BAA2) Increment *BAA2 by one.
A859 INC A
A85A LD ($BAA2),A
A85D CALL PopulateRoomBuffer Call PopulateRoomBuffer.
A860 DEC E Decrease E by one.
A861 JR NZ,$A856 Jump to A856 until E is zero.
A863 DEC D Decrease D by one.
A864 JR Z,$A869 Jump to A869 if D is zero.
A866 DEC B Decrease B by one.
A867 JR $A84B Jump to A84B.
A869 POP HL Restore HL, DE, BC and AF from the stack.
A86A POP DE
A86B POP BC
A86C POP AF
A86D RET Return.
Prev: A817 Up: Map Next: A86E