![]() |
Routines |
| Prev: 57672 | Up: Map | Next: 57856 |
|
Used by the routine at CopyBuffersToScreen.
Copies the attributes of the attribute buffer onto the screen, in the same way as CopyPixelsToScreen. The buffer holds 14 rows of 24 bytes, and the top row of the buffer is the bottom row of the playing area.
|
||||
|
Point the stack at the last row of attributes.
|
||||
| CopyAttributesToScreen | 57773 | LD (48046),SP | Save the stack pointer, point it at the end of the last row of attributes of the playing area, count 14 rows, and point HL at the end of the first row of the buffer. | |
| 57777 | LD SP,23037 | |||
| 57780 | LD B,14 | |||
| 57782 | LD HL,61531 | |||
|
Copy a row and step up the screen.
|
||||
| CopyAttributesToScreen_Row | 57785 | LD D,(HL) | Copy the last twenty bytes of the row from the buffer onto the screen, two at a time. | |
| 57786 | DEC HL | |||
| 57787 | LD E,(HL) | |||
| 57788 | DEC HL | |||
| 57789 | PUSH DE | |||
| 57790 | LD D,(HL) | |||
| 57791 | DEC HL | |||
| 57792 | LD E,(HL) | |||
| 57793 | DEC HL | |||
| 57794 | PUSH DE | |||
| 57795 | LD D,(HL) | |||
| 57796 | DEC HL | |||
| 57797 | LD E,(HL) | |||
| 57798 | DEC HL | |||
| 57799 | PUSH DE | |||
| 57800 | LD D,(HL) | |||
| 57801 | DEC HL | |||
| 57802 | LD E,(HL) | |||
| 57803 | DEC HL | |||
| 57804 | PUSH DE | |||
| 57805 | LD D,(HL) | |||
| 57806 | DEC HL | |||
| 57807 | LD E,(HL) | |||
| 57808 | DEC HL | |||
| 57809 | PUSH DE | |||
| 57810 | LD D,(HL) | |||
| 57811 | DEC HL | |||
| 57812 | LD E,(HL) | |||
| 57813 | DEC HL | |||
| 57814 | PUSH DE | |||
| 57815 | LD D,(HL) | |||
| 57816 | DEC HL | |||
| 57817 | LD E,(HL) | |||
| 57818 | DEC HL | |||
| 57819 | PUSH DE | |||
| 57820 | LD D,(HL) | |||
| 57821 | DEC HL | |||
| 57822 | LD E,(HL) | |||
| 57823 | DEC HL | |||
| 57824 | PUSH DE | |||
| 57825 | LD D,(HL) | |||
| 57826 | DEC HL | |||
| 57827 | LD E,(HL) | |||
| 57828 | DEC HL | |||
| 57829 | PUSH DE | |||
| 57830 | LD D,(HL) | |||
| 57831 | DEC HL | |||
| 57832 | LD E,(HL) | |||
| 57833 | DEC HL | |||
| 57834 | PUSH DE | |||
| 57835 | LD D,(HL) | Copy the first two bytes of the row onto the screen. | ||
| 57836 | DEC HL | |||
| 57837 | LD E,(HL) | |||
| 57838 | PUSH DE | |||
| 57839 | EX DE,HL | Keep the buffer address in DE. | ||
| 57840 | LD HL,65526 | Move up one row of attributes on the screen. | ||
| 57843 | ADD HL,SP | |||
| 57844 | LD SP,HL | |||
| 57845 | LD HL,45 | Move on to the end of the next row of the buffer. | ||
| 57848 | ADD HL,DE | |||
| 57849 | DJNZ CopyAttributesToScreen_Row | Loop back until all of the rows have been copied. | ||
| 57851 | LD SP,(48046) | Get the stack pointer back and return. | ||
| 57855 | RET | |||
| Prev: 57672 | Up: Map | Next: 57856 |