Prev: 39883 Up: Map Next: 39958
39933: Paint a character's attributes
Used by the routine at 39883.
Input
IX A character's entry in table of characters' current positions at 24898.
39933 LD C,(IX+1) Load C with character's x-coordinate (characters)
39936 LD B,(IX+2) Load B with character's y-coordinate (characters)
39939 CALL 63219 Load HL with attribute file address for coordinates (C, B)
The operand of the instruction at 39942 represents the character's attribute value. This is modified by the instruction at 39896.
39942 LD A,0 Load A with attribute value
39944 LD B,4 Load B with 4 (as characters are four characters high)
39946 PUSH BC Store BC (B = remaining number of character rows to paint)
39947 LD (HL),A Paint character's attribute at coordinates (C, B)...
39948 INC HL ...
39949 LD (HL),A ...and at coordinates (C + 1, B)
39950 LD BC,31 Advance down one character row, and left one character to coordinates (C, B + 1)...
39953 ADD HL,BC ...
39954 POP BC Restore BC (B = remaining number of character rows to paint)
39955 DJNZ 39946 Decrease remaining number of character rows to paint and loop back to 39946
39957 RET Return
Prev: 39883 Up: Map Next: 39958