Prev: 60785 Up: Map Next: 60819
60796: Scan and Cycle Screen Attributes
Scans the entire screen attribute area from 22528 to 23295 comparing each attribute byte against the colour substitution table at 61019. 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 60796 LD DE,22528 Point DE to the start of the attribute area at 22528.
Scan_Attr_Loop 60799 LD A,(DE) Load the current attribute byte from the display.
60800 LD HL,61019 Set up to search for this attribute in the substitution table at 61019.
60803 LD BC,10
60806 CPIR Search for the attribute in the substitution table.
60808 JR NZ,Scan_Attr_Next Skip replacement if the attribute was not found.
60810 LD A,(HL) Replace the attribute with its substitution byte.
60811 LD (DE),A
Scan_Attr_Next 60812 INC DE Advance to the next attribute cell.
60813 LD A,D Check if the scan has reached the end of the attribute area.
60814 CP 91
60816 JR NZ,Scan_Attr_Loop Loop back to Scan_Attr_Loop until all attribute cells are processed.
60818 RET Return.
Prev: 60785 Up: Map Next: 60819