Prev: ED71 Up: Map Next: ED93
ED7C: Scan and Cycle Screen Attributes
Scans the entire screen attribute area from 5800 to 5AFF comparing each attribute byte against the colour substitution table at EE5B. Any matching byte is replaced with its table-defined counterpart. Called each frame during the high score display loops to cycle the colour state of the score cells.
Scan_And_Cycle_Screen_Attributes ED7C LD DE,$5800 Point DE to the start of the attribute area at 5800.
Scan_Attr_Loop ED7F LD A,(DE) Load the current attribute byte from the display.
ED80 LD HL,$EE5B Set up to search for this attribute in the substitution table at EE5B.
ED83 LD BC,$000A
ED86 CPIR Search for the attribute in the substitution table.
ED88 JR NZ,Scan_Attr_Next Skip replacement if the attribute was not found.
ED8A LD A,(HL) Replace the attribute with its substitution byte.
ED8B LD (DE),A
Scan_Attr_Next ED8C INC DE Advance to the next attribute cell.
ED8D LD A,D Check if the scan has reached the end of the attribute area.
ED8E CP $5B
ED90 JR NZ,Scan_Attr_Loop Loop back to Scan_Attr_Loop until all attribute cells are processed.
ED92 RET Return.
Prev: ED71 Up: Map Next: ED93