Prev: 33269 Up: Map Next: 33312
33278: Flash border and screen (as in cast a spell)
Used by the routines at 32390, 32764, 32823, 32903, 32982, 33036, 33129, 33180, 33269 and 33312.
33278 LD B,96 Load B with 96 (number of times to repeat routine)
33280 LD DE,608 Load DE with 608 (number of bytes to modify - i.e. top 19 rows)
33283 LD HL,22528 Point HL at start of attribute file
33286 LD A,(HL) Load attribute byte into A
33287 AND 248 Clear three lowest bits (i.e. INK colour) preserving only PAPER, BRIGHT and FLASH bits
33289 LD C,A Place modified value into C
33290 LD A,(HL) Get original attribute from screen again
33291 INC A Increase by one
33292 AND 7 Clear all bits except the lowest three (i.e. INK colour)
33294 OUT (254),A Set border colour to A
33296 OR C Combine other bits back in
33297 OUT (254),A Update border / speaker state
33299 LD (HL),A Load modified value back into attribute file
33300 INC HL Move to next byte in attribute file
33301 DEC DE Reduce DE (reducing number of attribute bytes left to modify)
33302 LD A,D If DE is not zero (i.e. there are more attribute bytes to modify)...
33303 OR E ...
33304 JR NZ,33286 ...then loop back to 33286
33306 DJNZ 33280 Loop back for another pass
33308 XOR A Set A to zero
33309 OUT (254),A Reset border to black and reset speaker state
33311 RET Return
Prev: 33269 Up: Map Next: 33312