Prev: B4F8 Up: Map Next: B52E
B50A: Print Double Height Character
Used by the routine at PrintDoubleHeightText.
Prints a character with every pixel row drawn twice, so that it is two characters tall.
Input
A Character code (bit 7 is ignored)
HL Screen address
DE Pointer to the next character of the text
Output
DE Pointer to the following character of the text
HL Screen address of the next column
PrintDoubleHeightCharacter B50A PUSH DE Save the pointer into the text.
B50B PUSH HL Save the screen address.
B50C LD DE,($9618) Fetch the address of the current character set.
B510 ADD A,A Multiply the character code by 08 (by doubling it and then multiplying it by four), ignoring bit 7.
B511 LD L,A
B512 LD H,$00
B514 ADD HL,HL
B515 ADD HL,HL
B516 ADD HL,DE Add the address of the character set.
B517 EX DE,HL Point DE at the graphics of the character.
B518 POP HL Restore the screen address.
B519 PUSH HL Save it again.
B51A LD B,$08 There are 08 pixel rows in a character.
PrintDoubleHeightCharacter_Row B51C LD A,(DE) Fetch a pixel row of the character.
B51D LD (HL),A Write it to the screen.
B51E LD C,A Keep a copy.
B51F CALL NextPixelRow Move down to the next pixel row using NextPixelRow.
B522 LD (HL),C Write the pixel row again.
B523 CALL NextPixelRow Move down to the next pixel row.
B526 INC DE Move on to the next pixel row of the character.
B527 DJNZ PrintDoubleHeightCharacter_Row Loop back until the whole character has been printed.
B529 POP HL Restore the screen address.
B52A POP DE Restore the pointer into the text.
B52B INC DE Move on to the next character of the text.
B52C INC L Move on to the next column.
B52D RET Return.
Prev: B4F8 Up: Map Next: B52E