Prev: 43647 Up: Map Next: 43716
43674: Print Large Text
Prints a message in letters twice as big as normal, so each letter takes four character cells. The message is an attribute byte followed by characters and ends with a zero byte.
large-text
Input
DE The address of the message
HL The screen address to print it at
Fetch the attribute of the message.
PrintLargeText 43674 LD A,(DE) Fetch the attribute.
43675 INC DE Move on to the first character.
43676 EX AF,AF' Keep the attribute in the alternate accumulator.
Print each character until the terminator.
PrintLargeText_Loop 43677 LD A,(DE) Fetch the next character.
43678 AND A Test whether it is the end of the message.
43679 RET Z Return if it is.
43680 INC DE Move on to the next character.
43681 CALL ConvertCharacter Convert the character to the number of its tile.
Find the pixels of the character.
43684 PUSH DE Stash the address of the message on the stack.
43685 PUSH HL Stash the screen address on the stack.
43686 EX DE,HL Swap the screen address into DE.
43687 LD L,A Copy the tile number into L.
43688 LD H,0 Clear H.
43690 ADD HL,HL Multiply it by eight.
43691 ADD HL,HL
43692 ADD HL,HL
43693 LD BC,36520 Point BC at Font.
43696 ADD HL,BC Add the offset to find the pixels of the character.
43697 EX DE,HL Swap them, so that DE has the pixels and HL the screen address.
Draw the four quarters of the character.
43698 CALL PrintLeftHalfOfCharacter Draw the top left quarter of the character.
43701 CALL PrintRightHalfOfCharacter Draw the top right quarter of the character.
43704 CALL PrintLeftHalfOfCharacter Draw the bottom left quarter of the character.
43707 CALL PrintRightHalfOfCharacter Draw the bottom right quarter of the character.
43710 POP HL Retrieve the screen address.
43711 POP DE Retrieve the address of the message.
43712 INC L Move across by two character cells.
43713 INC L
43714 JR PrintLargeText_Loop Loop back for the next character.
Prev: 43647 Up: Map Next: 43716