Prev: CB19 Up: Map Next: CB5B
CB3E: Print four characters as a piece two characters square
Each character is coloured as it is printed (PRINT_CHAR_COLOURED). HL comes back as it was. The frames are made of these (FRAME_PIECES), and so are the compass (PRINT_COMPASS) and the lives (PRINT_LIFE_ICON).
Input
HL the screen address of the top-left
DE the four codes: top left, top right, bottom left, bottom right
A' the colour
Output
DE past the four codes
PRINT_BLOCK CB3E PUSH HL the top row's two
CB3F LD A,(DE)
CB40 INC DE
CB41 CALL PRINT_CHAR_COLOURED
CB44 INC L
CB45 LD A,(DE)
CB46 INC DE
CB47 CALL PRINT_CHAR_COLOURED
CB4A DEC L back to the left, a character row down
CB4B CALL NEXT_CHAR_ROW
CB4E LD A,(DE) the bottom row's two
CB4F INC DE
CB50 CALL PRINT_CHAR_COLOURED
CB53 INC L
CB54 LD A,(DE)
CB55 INC DE
CB56 CALL PRINT_CHAR_COLOURED
CB59 POP HL
CB5A RET
Prev: CB19 Up: Map Next: CB5B