![]() |
Routines |
| Prev: 860D | Up: Map | Next: 867A |
|
Used by the routine at Print_Character.
Scrolls the attribute line up by five rows and restores the pointers.
|
||||
| Print_ScrollTheAttributeLine | 864A | PUSH HL | Point at 50C0. | |
| 864B | PUSH DE | |||
| 864C | PUSH BC | |||
| 864D | PUSH AF | |||
| 864E | LD HL,$50C0 | |||
| 8651 | LD DE,$50E0 | Point DE at the attribute line. | ||
| 8654 | LD A,$05 | Load 05 before the day and night test. | ||
| Print_ScrollTheAttributeLine_ScrollOneRow | 8656 | PUSH HL | Count 08 passes. | |
| 8657 | PUSH DE | |||
| 8658 | LD B,$08 | |||
| Print_ScrollTheAttributeLine_CopyThePreparedBytes | 865A | PUSH HL | Copy the prepared bytes. | |
| 865B | PUSH DE | |||
| 865C | PUSH BC | |||
| 865D | LD BC,$0020 | |||
| 8660 | LDIR | |||
| 8662 | POP BC | Restore BC, DE and HL from the stack, and step HL down one pixel row. | ||
| 8663 | POP DE | |||
| 8664 | POP HL | |||
| 8665 | INC H | |||
| 8666 | INC D | Step DE down one pixel row. | ||
| 8667 | DJNZ Print_ScrollTheAttributeLine_CopyThePreparedBytes | Loop back to Print_ScrollTheAttributeLine_CopyThePreparedBytes until all 08 pixel rows are done. | ||
| 8669 | POP DE | Restore the screen pointers and step HL back one row. | ||
| 866A | POP HL | |||
| 866B | LD BC,$FFE0 | |||
| 866E | ADD HL,BC | |||
| 866F | EX DE,HL | Swap the two screen pointers. | ||
| 8670 | ADD HL,BC | Step the other pointer up one screen row. | ||
| 8671 | EX DE,HL | Swap the two screen pointers. | ||
| 8672 | DEC A | Jump back to Print_ScrollTheAttributeLine_ScrollOneRow until the row count in A reaches zero. | ||
| 8673 | JR NZ,Print_ScrollTheAttributeLine_ScrollOneRow | |||
| 8675 | POP AF | Restore AF, BC, DE and HL from the stack. | ||
| 8676 | POP BC | |||
| 8677 | POP DE | |||
| 8678 | POP HL | |||
| 8679 | RET | Return. | ||
| Prev: 860D | Up: Map | Next: 867A |