![]() |
Routines |
| Prev: 43674 | Up: Map | Next: 43751 |
|
Used by the routine at PrintLargeText.
Draws the left half of four rows of a character in double size. The four bytes of pixels at DE each have their left four pixels widened to eight and written twice, so they fill the eight pixel rows of a character cell. The cell is coloured with the attribute and HL moves to the cell on its right.
|
||||||||||||||
|
Swap the pixels and the screen address.
|
||||||||||||||
| PrintLeftHalfOfCharacter | 43716 | PUSH DE | Stash the address of the pixels on the stack. | |||||||||||
| 43717 | PUSH HL | Stash the screen address on the stack. | ||||||||||||
| 43718 | EX DE,HL | Swap the pixels into HL and the screen address into DE. | ||||||||||||
| 43719 | LD B,4 | Set the number of rows to four. | ||||||||||||
|
Widen the left four pixels of each row.
|
||||||||||||||
| PrintLeftHalf_Loop | 43721 | LD A,(HL) | Fetch a row of pixels. | |||||||||||
| 43722 | INC HL | Move on to the next row. | ||||||||||||
| 43723 | RRCA | Move the left four pixels into the bottom of the byte. | ||||||||||||
| 43724 | RRCA | |||||||||||||
| 43725 | RRCA | |||||||||||||
| 43726 | RRCA | |||||||||||||
| 43727 | AND %00001111 | Keep them. | ||||||||||||
| 43729 | PUSH HL | Stash the address of the pixels on the stack. | ||||||||||||
| 43730 | LD HL,43784 | Point HL at WidenedPixels. | ||||||||||||
| 43733 | CALL AddAToHL | Point HL at the entry for the four pixels. | ||||||||||||
| 43736 | LD A,(HL) | Fetch the widened pixels. | ||||||||||||
| 43737 | LD (DE),A | Write them to the screen. | ||||||||||||
| 43738 | INC D | Move down a pixel row. | ||||||||||||
| 43739 | LD (DE),A | Write them again. | ||||||||||||
| 43740 | INC D | Move down a pixel row. | ||||||||||||
| 43741 | POP HL | Retrieve the address of the pixels. | ||||||||||||
| 43742 | DJNZ PrintLeftHalf_Loop | Loop back until four rows have been drawn. | ||||||||||||
|
Colour the cell and move to the right.
|
||||||||||||||
| 43744 | POP HL | Retrieve the screen address. | ||||||||||||
| 43745 | POP DE | Retrieve the address of the pixels. | ||||||||||||
| 43746 | CALL SetTileAttribute | Set the attribute of the cell. | ||||||||||||
| 43749 | INC L | Move across to the next cell. | ||||||||||||
| 43750 | RET | Return. | ||||||||||||
| Prev: 43674 | Up: Map | Next: 43751 |