Prev: 7242 Up: Map Next: 728C
7271: Reverse Attribute Row
Used by the routine at PatchShift.
Copies a reversed attribute row into the illustration buffer.
ReverseAttributeRow 7271 PUSH BC Stash the row counter on the stack.
7272 CALL AttributeRow Call AttributeRow.
7275 LD DE,$0000 Load the patched width.
7278 PUSH HL Point DE at the start and HL at the far end.
7279 ADD HL,DE
727A DEC HL
727B POP DE
727C LD B,$00 Copy 0100 bytes.
Copy one reversed byte.
ReverseAttributeRow_Byte 727E LD A,(DE) Copy this byte.
727F LD (HL),A
7280 INC DE Step both pointers.
7281 DEC HL
7282 DJNZ ReverseAttributeRow_Byte Jump to ReverseAttributeRow_Byte until the row is done.
7284 POP BC Restore the row counter from the stack.
7285 INC B Jump to ReverseAttributeRow until the patched row count is done.
7286 LD A,$00
7288 CP B
7289 JR NZ,ReverseAttributeRow
728B RET Return.
Prev: 7242 Up: Map Next: 728C