Prev: 27606 Up: Map Next: 27663
27642: Print a tile or font character
Used by the routines at 25947, 27464 and 27606.
Input
C Attribute byte
DE Address of the sprite tile or font character graphic data
HL Display file address
HL' Attribute file address
Output
HL Display file address for the next tile to the right
HL' Attribute file address for the next tile to the right
27642 LD A,C Copy the attribute byte to A.
27643 EXX Exchange registers.
27644 LD (HL),A Set the attribute byte.
27645 INC HL Point HL' at the next attribute byte.
27646 EXX Exchange registers.
27647 LD B,8 Copy the 8 graphic bytes of the tile to the screen.
27649 LD A,(DE)
27650 LD (HL),A
27651 INC H
27652 INC DE
27653 DJNZ 27649
27655 INC L Set HL to the display file address for the next tile to the right.
27656 RET Z
27657 LD B,8
27659 LD A,H
27660 SUB B
27661 LD H,A
27662 RET
Prev: 27606 Up: Map Next: 27663