![]() |
Routines |
| Prev: C991 | Up: Map | Next: C9DA |
|
Not used. Copies attributes from the bytes that follow the width and height of an area, rather than filling the area with one value as FillAttributes does.
|
||||||||||
| CopyAttributes | C9B3 | PUSH HL | Stash HL on the stack. | |||||||
| C9B4 | LD A,(DE) | Read DE. | ||||||||
| C9B5 | LD B,A | B=A. | ||||||||
| C9B6 | INC DE | Advance DE. | ||||||||
| C9B7 | LD A,(DE) | Read DE. | ||||||||
| C9B8 | LD C,A | C=A. | ||||||||
| C9B9 | CALL AttributeAddress | Call AttributeAddress. | ||||||||
| C9BC | LD A,B | A=B. | ||||||||
| C9BD | LD ($5C1C),A | The width of the attribute area. | ||||||||
| C9C0 | INC DE | Advance DE. | ||||||||
| CopyAttributes_Row | C9C1 | PUSH HL | Stash HL on the stack. | |||||||
| C9C2 | LD A,($5C1C) | The width of the attribute area. | ||||||||
| C9C5 | LD B,A | B=A. | ||||||||
| CopyAttributes_Byte | C9C6 | LD A,(DE) | Read DE. | |||||||
| C9C7 | LD (HL),A | Write A where HL points. | ||||||||
| C9C8 | INC DE | Advance DE. | ||||||||
| C9C9 | INC HL | Advance HL. | ||||||||
| C9CA | DJNZ CopyAttributes_Byte | Decrease B and jump to CopyAttributes_Byte until none remain. | ||||||||
| C9CC | POP HL | Bring HL back off the stack. | ||||||||
| C9CD | PUSH DE | Stash DE on the stack. | ||||||||
| C9CE | LD DE,$0020 | DE=20. | ||||||||
| C9D1 | AND A | Is A zero? | ||||||||
| C9D2 | SBC HL,DE | Subtract DE and the carry from HL. | ||||||||
| C9D4 | POP DE | Bring DE back off the stack. | ||||||||
| C9D5 | DEC C | Step C back. | ||||||||
| C9D6 | JR NZ,CopyAttributes_Row | Jump to CopyAttributes_Row if the zero flag is clear. | ||||||||
| C9D8 | POP HL | Bring HL back off the stack. | ||||||||
| C9D9 | RET | Return. | ||||||||
| Prev: C991 | Up: Map | Next: C9DA |