![]() |
Routines |
| Prev: 46346 | Up: Map | Next: 46424 |
|
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 | 46382 | PUSH HL | Save the position. | |||||||||||
| 46383 | CALL AttributeAddress | Find the address of the attributes at that position using AttributeAddress. | ||||||||||||
| 46386 | LD A,(DE) | Fetch the attribute from the start of the string. | ||||||||||||
| 46387 | INC DE | Move on to the first character. | ||||||||||||
| 46388 | LD C,A | Keep the attribute. | ||||||||||||
| 46389 | LD B,2 | The text is two characters tall. | ||||||||||||
| PrintDoubleHeightText_Attributes | 46391 | PUSH DE | Save the pointer to the text. | |||||||||||
| 46392 | PUSH HL | Save the attribute address. | ||||||||||||
| PrintDoubleHeightText_Attribute | 46393 | LD (HL),C | Colour the current cell. | |||||||||||
| 46394 | LD A,(DE) | Fetch the next character code. | ||||||||||||
| 46395 | INC DE | Move on. | ||||||||||||
| 46396 | INC L | Move on to the next column. | ||||||||||||
| 46397 | BIT 7,A | Test whether it was the last character of the text. | ||||||||||||
| 46399 | JR Z,PrintDoubleHeightText_Attribute | Loop back until the whole row has been coloured. | ||||||||||||
| 46401 | POP HL | Restore the attribute address. | ||||||||||||
| 46402 | LD DE,32 | Move down to the next row. | ||||||||||||
| 46405 | ADD HL,DE | |||||||||||||
| 46406 | POP DE | Restore the pointer to the text. | ||||||||||||
| 46407 | DJNZ PrintDoubleHeightText_Attributes | Loop back to colour the second row. | ||||||||||||
| 46409 | POP HL | Restore the position. | ||||||||||||
| 46410 | CALL ScreenAddress | Find the screen address using ScreenAddress. | ||||||||||||
| PrintDoubleHeightText_Character | 46413 | LD A,(DE) | Fetch the next character code. | |||||||||||
| 46414 | BIT 7,A | Jump to PrintDoubleHeightCharacter to print the last character. | ||||||||||||
| 46416 | JP NZ,PrintDoubleHeightCharacter | |||||||||||||
| 46419 | CALL PrintDoubleHeightCharacter | Print the character using PrintDoubleHeightCharacter. | ||||||||||||
| 46422 | JR PrintDoubleHeightText_Character | Jump back to print the next character. | ||||||||||||
| Prev: 46346 | Up: Map | Next: 46424 |