Prev: AA7F Up: Map Next: AAC4
AA9A: 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 AA9A LD A,(DE) Fetch the attribute.
AA9B INC DE Move on to the first character.
AA9C EX AF,AF' Keep the attribute in the alternate accumulator.
Print each character until the terminator.
PrintLargeText_Loop AA9D LD A,(DE) Fetch the next character.
AA9E AND A Test whether it is the end of the message.
AA9F RET Z Return if it is.
AAA0 INC DE Move on to the next character.
AAA1 CALL ConvertCharacter Convert the character to the number of its tile.
Find the pixels of the character.
AAA4 PUSH DE Stash the address of the message on the stack.
AAA5 PUSH HL Stash the screen address on the stack.
AAA6 EX DE,HL Swap the screen address into DE.
AAA7 LD L,A Copy the tile number into L.
AAA8 LD H,$00 Clear H.
AAAA ADD HL,HL Multiply it by eight.
AAAB ADD HL,HL
AAAC ADD HL,HL
AAAD LD BC,$8EA8 Point BC at Font.
AAB0 ADD HL,BC Add the offset to find the pixels of the character.
AAB1 EX DE,HL Swap them, so that DE has the pixels and HL the screen address.
Draw the four quarters of the character.
AAB2 CALL PrintLeftHalfOfCharacter Draw the top left quarter of the character.
AAB5 CALL PrintRightHalfOfCharacter Draw the top right quarter of the character.
AAB8 CALL PrintLeftHalfOfCharacter Draw the bottom left quarter of the character.
AABB CALL PrintRightHalfOfCharacter Draw the bottom right quarter of the character.
AABE POP HL Retrieve the screen address.
AABF POP DE Retrieve the address of the message.
AAC0 INC L Move across by two character cells.
AAC1 INC L
AAC2 JR PrintLargeText_Loop Loop back for the next character.
Prev: AA7F Up: Map Next: AAC4