Prev: 52550 Up: Map Next: 52658
52600: Print Double Height
Prints C ROM-font characters from HL to screen address DE at double height.
Input
HL Pointer to the ASCII characters
DE Destination screen address
C Number of characters to print
Print_Double_Height 52600 PUSH HL Stash the character pointer and screen address on the stack.
52601 PUSH DE
52602 PUSH DE Stash the screen address on the stack.
52603 LD A,(HL) Fetch the next character.
52604 LD D,0 Convert the character to a font offset.
52606 RLA
52607 RL D
52609 RLA
52610 RL D
52612 RLA
52613 RL D
52615 AND %11111000 Keep only bits 3-7.
52617 LD E,A Store the font offset in E.
52618 LD HL,(23606) Point HL at the ROM font.
52621 ADD HL,DE Point HL at the glyph.
52622 POP DE Restore the screen address from the stack.
52623 LD B,4 Set the row counter to 4 in B.
Copy the top half of the glyph at double height.
Print_Double_Height_Top 52625 LD A,(HL) Write 4 glyph bytes to the screen, doubling each row.
52626 LD (DE),A
52627 INC D
52628 LD (DE),A
52629 INC D
52630 INC HL
52631 DJNZ Print_Double_Height_Top
Move the screen address down one character row.
52633 PUSH HL Point DE at the next character row (using the stack).
52634 LD HL,63520
52637 ADD HL,DE
52638 EX DE,HL
52639 POP HL
52640 LD B,4 Set the row counter to 4 in B.
Copy the bottom half of the glyph at double height.
Print_Double_Height_Bottom 52642 LD A,(HL) Write 4 glyph bytes to the screen, doubling each row.
52643 LD (DE),A
52644 INC D
52645 LD (DE),A
52646 INC D
52647 INC HL
52648 DJNZ Print_Double_Height_Bottom
52650 POP DE Restore the screen address from the stack.
52651 INC E Advance the screen address by one.
52652 POP HL Restore the character pointer from the stack.
52653 INC HL Advance the character pointer.
52654 DEC C Decrease the character counter by one, and jump to Print_Double_Height until all characters are printed.
52655 JR NZ,Print_Double_Height
52657 RET Return.
Prev: 52550 Up: Map Next: 52658