Prev: E148 Up: Map Next: E200
E1AD: Copy the play area's attributes from the buffer to the screen
Used by the routine at SHOW_PLAY_AREA.
As COPY_BUFFER, a character row at a time: the attribute buffer's row 0, the play area's bottom row, goes to row 15 of the screen and its row 13 to row 2, bytes 2 to 23 of each to columns 7 to 28.
COPY_ATTR_BUFFER E1AD LD (SAVED_SP),SP Keep SP; point it just past column 28 of attribute row 15; 14 rows, from the end of the buffer's row 0
E1B1 LD SP,$59FD
E1B4 LD B,$0E
E1B6 LD HL,$F05B
COPY_ATTR_BUFFER_0 E1B9 LD D,(HL) Push the row's last 22 bytes
E1BA DEC HL
E1BB LD E,(HL)
E1BC DEC HL
E1BD PUSH DE
E1BE LD D,(HL)
E1BF DEC HL
E1C0 LD E,(HL)
E1C1 DEC HL
E1C2 PUSH DE
E1C3 LD D,(HL)
E1C4 DEC HL
E1C5 LD E,(HL)
E1C6 DEC HL
E1C7 PUSH DE
E1C8 LD D,(HL)
E1C9 DEC HL
E1CA LD E,(HL)
E1CB DEC HL
E1CC PUSH DE
E1CD LD D,(HL)
E1CE DEC HL
E1CF LD E,(HL)
E1D0 DEC HL
E1D1 PUSH DE
E1D2 LD D,(HL)
E1D3 DEC HL
E1D4 LD E,(HL)
E1D5 DEC HL
E1D6 PUSH DE
E1D7 LD D,(HL)
E1D8 DEC HL
E1D9 LD E,(HL)
E1DA DEC HL
E1DB PUSH DE
E1DC LD D,(HL)
E1DD DEC HL
E1DE LD E,(HL)
E1DF DEC HL
E1E0 PUSH DE
E1E1 LD D,(HL)
E1E2 DEC HL
E1E3 LD E,(HL)
E1E4 DEC HL
E1E5 PUSH DE
E1E6 LD D,(HL)
E1E7 DEC HL
E1E8 LD E,(HL)
E1E9 DEC HL
E1EA PUSH DE
E1EB LD D,(HL)
E1EC DEC HL
E1ED LD E,(HL)
E1EE PUSH DE
E1EF EX DE,HL SP up a row: 10 more to make 32; HL to the end of the next buffer row
E1F0 LD HL,$FFF6
E1F3 ADD HL,SP
E1F4 LD SP,HL
E1F5 LD HL,$002D
E1F8 ADD HL,DE
E1F9 DJNZ COPY_ATTR_BUFFER_0
E1FB LD SP,(SAVED_SP) Restore SP
E1FF RET
Prev: E148 Up: Map Next: E200