![]() |
Routines |
| Prev: 35311 | Up: Map | Next: 35383 |
|
Used by the routines at GameMenu, PrintBanner, GameOver_1UP_Messaging, 43945, MessageTeleporting, Message_MissileLaunch, NewHighScore_Suffix, HallOfFame and HighScoreMessaging.
|
||||||||
| PrintStringColour | 35345 | PUSH HL | Stash HL on the stack. | |||||
| 35346 | CALL ScreenAddress | Call ScreenAddress. | ||||||
| 35349 | LD A,(DE) | Fetch the attribute byte. | ||||||
| 35350 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 35351 | INC DE | Increment DE by one to point to the text of the string. | ||||||
| 35352 | EXX | Switch to the shadow registers. | ||||||
| 35353 | POP HL | Restore HL from the stack. | ||||||
| 35354 | CALL AttributeAddress | Call AttributeAddress. | ||||||
|
This entry point is used by the routine at MenuWriteText.
|
||||||||
| PrintString_Loop | 35357 | EXX | Switch back to the normal registers. | |||||
| 35358 | LD A,(DE) | Fetch the character to print. | ||||||
| 35359 | BIT 7,A | If bit 7 is set (which signifies the end of the string), jump to PrintString_LastCharacter. | ||||||
| 35361 | JR NZ,PrintString_LastCharacter | |||||||
| 35363 | CALL PrintScreen | Call PrintScreen. | ||||||
| 35366 | INC DE | Increment DE by one. | ||||||
| 35367 | EXX | Switch to the shadow registers. | ||||||
| 35368 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 35369 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
| 35370 | INC L | Increment L by one. | ||||||
| 35371 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 35372 | JR PrintString_Loop | Jump to PrintString_Loop. | ||||||
|
Because the last character contains the terminator, it needs to be handled separately.
|
||||||||
| PrintString_LastCharacter | 35374 | AND %01111111 | Keep only bits 0-6 (i.e. strip the bit 7 terminator). | |||||
| 35376 | CALL PrintScreen | Call PrintScreen. | ||||||
| 35379 | EXX | Switch to the shadow registers. | ||||||
| 35380 | EX AF,AF' | Switch to the shadow AF register. | ||||||
| 35381 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
| 35382 | RET | Return. | ||||||
| Prev: 35311 | Up: Map | Next: 35383 |