Prev: DAE9 Up: Map Next: DB22
DB02: Print Half A Double-Height Text Character
Used by the routine at PrintDoubleHeightCharacter.
Input
DE 3C00 + 08 × character index [+04 for second run-through] (i.e. points to ROM graphic data for the character of interest)
HL Attribute buffer address at which to print character
PrintHalfDoubleHeightTextCharacter DB02 PUSH HL Stash HL and BC on the stack.
DB03 PUSH BC
DB04 LD A,($6D96) Load StoredAttribute into A.
DB07 LD (HL),A Write this to attribute buffer.
DB08 LD A,H Multiply the most significant byte (MSB) of the attribute buffer address by 08 to put it on the same scale as the MSB of the display buffer address MSB (see notes).
DB09 ADD A,A
DB0A ADD A,A
DB0B ADD A,A
DB0C AND %01011011 Drop the most significant bit to point to the correct location in the display buffer.
DB0E LD H,A Load back into HL (L is unaffected, as it should be).
DB0F LD B,$04 Set B to 04 (loop counter).
PrintHalfDoubleHeightTextCharacter_Loop DB11 LD A,(DE) Load a byte from the graphic data into C.
DB12 LD C,A
DB13 SRL C Shift bitmap data left one pixel in C.
DB15 OR C Merge this into bitmap data already in A to give a "bold" typeface appearance.
DB16 AND %01111111 Drop the leftmost bit to prevent one character touching the next (space between letters).
DB18 LD (HL),A Load the bitmap data into two consecutive rows to provide double-height (02 chars) text.
DB19 INC H
DB1A LD (HL),A
DB1B INC H
DB1C INC DE Advance to next byte of graphic data.
DB1D DJNZ PrintHalfDoubleHeightTextCharacter_Loop Loop back to PrintHalfDoubleHeightTextCharacter_Loop to repeat for next row of graphic data.
DB1F POP BC Restore BC and HL from the stack.
DB20 POP HL
DB21 RET Return.
Prev: DAE9 Up: Map Next: DB22