Prev: 64456 Up: Map Next: 64582
64548: Flash border and screen (as in cast a spell)
Used by the routines at 44216, 44225 and 44253.
64548 LD B,96 Load B with 96 (number of times to repeat routine)
64550 LD DE,576 Load DE with 576 (number of bytes to modify - i.e. bottom 18 rows)
64553 LD HL,22720 Point HL at start of 7th row in attribute file
64556 LD A,(HL) Load attribute byte into A
64557 AND 248 Clear three lowest bits (i.e. INK colour) preserving only PAPER, BRIGHT and FLASH bits
64559 LD C,A Place modified value into C
64560 LD A,(HL) Get original attribute from screen again
64561 INC A Increase by one
64562 AND 7 Clear all bits except the lowest three (i.e. INK colour)
64564 OUT (254),A Set border colour to A
64566 OR C Combine other bits back in
64567 OUT (254),A Update border / speaker state
64569 LD (HL),A Load modified value back into attribute file
64570 INC HL Move to next byte in attribute file
64571 DEC DE Reduce DE (reducing number of attribute bytes left to modify)
64572 LD A,D If DE is not zero (i.e. there are more attribute bytes to modify)...
64573 OR E ...
64574 JR NZ,64556 ...then loop back to 64556
64576 DJNZ 64550 Loop back for another pass
64578 XOR A Set A to zero
64579 OUT (254),A Reset border to black and reset speaker state
64581 RET Return
Prev: 64456 Up: Map Next: 64582