![]() |
Routines |
| Prev: B50A | Up: Map | Next: B558 |
|
Prints a string of text that is two characters tall. The string starts with an attribute byte, and its last character has bit 7 set.
|
||||||||||||||
| PrintDoubleHeightText | B52E | PUSH HL | Save the position. | |||||||||||
| B52F | CALL AttributeAddress | Find the address of the attributes at that position using AttributeAddress. | ||||||||||||
| B532 | LD A,(DE) | Fetch the attribute from the start of the string. | ||||||||||||
| B533 | INC DE | Move on to the first character. | ||||||||||||
| B534 | LD C,A | Keep the attribute. | ||||||||||||
| B535 | LD B,$02 | The text is two characters tall. | ||||||||||||
| PrintDoubleHeightText_Attributes | B537 | PUSH DE | Save the pointer to the text. | |||||||||||
| B538 | PUSH HL | Save the attribute address. | ||||||||||||
| PrintDoubleHeightText_Attribute | B539 | LD (HL),C | Colour the current cell. | |||||||||||
| B53A | LD A,(DE) | Fetch the next character code. | ||||||||||||
| B53B | INC DE | Move on. | ||||||||||||
| B53C | INC L | Move on to the next column. | ||||||||||||
| B53D | BIT 7,A | Test whether it was the last character of the text. | ||||||||||||
| B53F | JR Z,PrintDoubleHeightText_Attribute | Loop back until the whole row has been coloured. | ||||||||||||
| B541 | POP HL | Restore the attribute address. | ||||||||||||
| B542 | LD DE,$0020 | Move down to the next row. | ||||||||||||
| B545 | ADD HL,DE | |||||||||||||
| B546 | POP DE | Restore the pointer to the text. | ||||||||||||
| B547 | DJNZ PrintDoubleHeightText_Attributes | Loop back to colour the second row. | ||||||||||||
| B549 | POP HL | Restore the position. | ||||||||||||
| B54A | CALL ScreenAddress | Find the screen address using ScreenAddress. | ||||||||||||
| PrintDoubleHeightText_Character | B54D | LD A,(DE) | Fetch the next character code. | |||||||||||
| B54E | BIT 7,A | Jump to PrintDoubleHeightCharacter to print the last character. | ||||||||||||
| B550 | JP NZ,PrintDoubleHeightCharacter | |||||||||||||
| B553 | CALL PrintDoubleHeightCharacter | Print the character using PrintDoubleHeightCharacter. | ||||||||||||
| B556 | JR PrintDoubleHeightText_Character | Jump back to print the next character. | ||||||||||||
| Prev: B50A | Up: Map | Next: B558 |