Routines |
Prev: 784B | Up: Map | Next: 7931 |
Used by the routine at DisplayTitleScreen.
|
||||||||||||||
Convert length into number of character blocks.
|
||||||||||||||
WriteAttributeData | 7917 | SRA C | Divide the length by 08 and store the result in C. | |||||||||||
7919 | SRA C | |||||||||||||
791B | SRA C | |||||||||||||
WriteAttributeData_Loop | 791D | PUSH HL | Stash HL and BC on the stack. | |||||||||||
791E | PUSH BC | |||||||||||||
WriteAttributeData_CopyLoop | 791F | LD A,(DE) | Copy a byte from the source address to the destination address in the attribute buffer. | |||||||||||
7920 | LD (HL),A | |||||||||||||
7921 | INC HL | Increment both the source and destination addresses. | ||||||||||||
7922 | INC DE | |||||||||||||
7923 | DJNZ WriteAttributeData_CopyLoop | Decrease the width counter by one and loop back to WriteAttributeData_CopyLoop until the counter is zero. | ||||||||||||
7925 | POP BC | Restore BC and HL from the stack. | ||||||||||||
7926 | POP HL | |||||||||||||
7927 | PUSH DE | Stash DE on the stack. | ||||||||||||
7928 | LD DE,$0020 | HL+=0020. | ||||||||||||
792B | ADD HL,DE | |||||||||||||
792C | POP DE | Restore DE from the stack. | ||||||||||||
792D | DEC C | Decrease the height counter by one and jump back to WriteAttributeData_Loop until the counter is zero. | ||||||||||||
792E | JR NZ,WriteAttributeData_Loop | |||||||||||||
7930 | RET | Return. |
Prev: 784B | Up: Map | Next: 7931 |