Prev: CB19 Up: Map Next: CB5B
CB3E: Print Character Block
Prints a block of four characters, in two rows of two, with the same attribute.
Input
A' Attribute
DE Address of the four characters
HL Screen address of the top left character
Output
DE Address after the four characters
Print the top row of the block.
PrintCharacterBlock CB3E PUSH HL Stash the screen address on the stack.
CB3F LD A,(DE) Print the top left character and move to the right.
CB40 INC DE
CB41 CALL PrintCharacterWithAttribute
CB44 INC L
CB45 LD A,(DE) Print the top right character and move back to the left.
CB46 INC DE
CB47 CALL PrintCharacterWithAttribute
CB4A DEC L
Print the bottom row of the block.
CB4B CALL MoveDownRow Call MoveDownRow.
CB4E LD A,(DE) Print the bottom left character and move to the right.
CB4F INC DE
CB50 CALL PrintCharacterWithAttribute
CB53 INC L
CB54 LD A,(DE) Print the bottom right character.
CB55 INC DE
CB56 CALL PrintCharacterWithAttribute
CB59 POP HL Restore the screen address from the stack.
CB5A RET Return.
Prev: CB19 Up: Map Next: CB5B