![]() |
Routines |
| Prev: 29645 | Up: Map | Next: 29715 |
|
||||||||
| PrintString | 29677 | PUSH HL | Stash HL on the stack. | |||||
| 29678 | CALL ScreenAddress | Call ScreenAddress. | ||||||
| 29681 | LD A,(DE) | Fetch the attribute byte. | ||||||
| 29682 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 29683 | INC DE | Increment DE by one to point to the text of the string. | ||||||
| 29684 | EXX | Switch to the shadow registers. | ||||||
| 29685 | POP HL | Restore HL' from the stack. | ||||||
| 29686 | CALL AttributeAddress | Call AttributeAddress. | ||||||
|
This entry point is used by the routine at MenuWriteText.
|
||||||||
| PrintString_Loop | 29689 | EXX | Switch back to the normal registers. | |||||
| 29690 | LD A,(DE) | Fetch the character to print. | ||||||
| 29691 | BIT 7,A | If bit 7 is set (which signifies the end of the string), jump to PrintString_LastCharacter. | ||||||
| 29693 | JR NZ,PrintString_LastCharacter | |||||||
| 29695 | CALL PrintScreen | Call PrintScreen. | ||||||
| 29698 | INC DE | Increment DE by one. | ||||||
| 29699 | EXX | Switch to the shadow registers. | ||||||
| 29700 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 29701 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
| 29702 | INC L | Increment L by one. | ||||||
| 29703 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 29704 | JR PrintString_Loop | Jump to PrintString_Loop. | ||||||
|
Because the last character contains the terminator, it needs to be handled separately.
|
||||||||
| PrintString_LastCharacter | 29706 | AND %01111111 | Keep only bits 0-6 (i.e. strip the bit 7 terminator). | |||||
| 29708 | CALL PrintScreen | Call PrintScreen. | ||||||
| 29711 | EXX | Switch to the shadow registers. | ||||||
| 29712 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 29713 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
| 29714 | RET | Return. | ||||||
| Prev: 29645 | Up: Map | Next: 29715 |