Prev: 29835 Up: Map Next: 29917
29886: Mirror Attribute Row
Used by the routine at VerticalRun_Patch.
Reverses an attribute row about its midpoint.
VerticalRun_Copy 29886 PUSH BC Stash the row counter on the stack.
29887 CALL AttributeRow Call AttributeRow.
The width immediate is self-modified by VerticalRun_Draw.
29890 LD DE,0 Load that width.
29893 PUSH HL Stash the start of the row on the stack.
29894 ADD HL,DE Add that width.
29895 DEC HL Point at the last byte.
29896 POP DE Restore the start into DE.
29897 LD B,0 Copy 256 bytes.
Swap one reversed pair.
VerticalRun_CopyByte 29899 LD A,(DE) Swap this pair.
29900 LD C,(HL)
29901 EX DE,HL
29902 LD (HL),C
29903 LD (DE),A
29904 EX DE,HL
29905 INC DE Step both pointers.
29906 DEC HL
29907 DJNZ VerticalRun_CopyByte Jump to VerticalRun_CopyByte until the row is done.
29909 POP BC Restore the row counter from the stack.
29910 INC B Increment the row counter.
The stop immediate is self-modified by VerticalRun_Patch and FixedVertical.
29911 LD A,0 Jump to VerticalRun_Copy until the row counter equals that stop.
29913 CP B
29914 JR NZ,VerticalRun_Copy
29916 RET Return.
Prev: 29835 Up: Map Next: 29917