Prev: 748B Up: Map Next: 74DD
74BE: Mirror Attribute Row
Used by the routine at VerticalRun_Patch.
Reverses an attribute row about its midpoint.
VerticalRun_Copy 74BE PUSH BC Stash the row counter on the stack.
74BF CALL AttributeRow Call AttributeRow.
The width immediate is self-modified by VerticalRun_Draw.
74C2 LD DE,$0000 Load that width.
74C5 PUSH HL Stash the start of the row on the stack.
74C6 ADD HL,DE Add that width.
74C7 DEC HL Point at the last byte.
74C8 POP DE Restore the start into DE.
74C9 LD B,$00 Copy 0100 bytes.
Swap one reversed pair.
VerticalRun_CopyByte 74CB LD A,(DE) Swap this pair.
74CC LD C,(HL)
74CD EX DE,HL
74CE LD (HL),C
74CF LD (DE),A
74D0 EX DE,HL
74D1 INC DE Step both pointers.
74D2 DEC HL
74D3 DJNZ VerticalRun_CopyByte Jump to VerticalRun_CopyByte until the row is done.
74D5 POP BC Restore the row counter from the stack.
74D6 INC B Increment the row counter.
The stop immediate is self-modified by VerticalRun_Patch and FixedVertical.
74D7 LD A,$00 Jump to VerticalRun_Copy until the row counter equals that stop.
74D9 CP B
74DA JR NZ,VerticalRun_Copy
74DC RET Return.
Prev: 748B Up: Map Next: 74DD