← 9819 Playfield corner tiles Map 9837 → Fill the attribute file with the color in A
9829: Clear the screen bitmap to zero
Zeroes the display file, and one byte past it the first cell of the attribute file.
That overrun is the propagate-fill's last copy. The seed write of the attribute fill covers the cell before anything reads it.
clear_screen 9829 LD HL,SCREEN_BASE Start of the display file.
982C LD DE,SCREEN_BASE+$1 LDIR destination is one byte ahead.
982F LD BC,SCREEN_SIZE Sized from the display-file constant; the colors come from a separate pass (fill_attrs).
9832 LD (HL),$00 Seed the first byte with zero.
9834 LDIR Propagate it through the file.
9836 RET
← 9819 Playfield corner tiles Map 9837 → Fill the attribute file with the color in A
Fork me on GitHub