Routines |
Prev: 89EF | Up: Map | Next: 8A37 |
Used by the routines at GameMenu, PrintBanner, GameOver_1UP_Messaging, ABA9, MessageTeleporting, Message_MissileLaunch, NewHighScore_Suffix, HallOfFame and HighScoreMessaging.
|
||||||||
PrintStringColour | 8A11 | PUSH HL | Stash HL on the stack. | |||||
8A12 | CALL ScreenAddress | Call ScreenAddress. | ||||||
8A15 | LD A,(DE) | Fetch the attribute byte. | ||||||
8A16 | EX AF,AF' | Switch to the shadow AF register. | ||||||
8A17 | INC DE | Increment DE by one to point to the text of the string. | ||||||
8A18 | EXX | Switch to the shadow registers. | ||||||
8A19 | POP HL | Restore HL from the stack. | ||||||
8A1A | CALL AttributeAddress | Call AttributeAddress. | ||||||
This entry point is used by the routine at MenuWriteText.
|
||||||||
PrintString_Loop | 8A1D | EXX | Switch back to the normal registers. | |||||
8A1E | LD A,(DE) | Fetch the character to print. | ||||||
8A1F | BIT 7,A | If bit 7 is set (which signifies the end of the string), jump to PrintString_LastCharacter. | ||||||
8A21 | JR NZ,PrintString_LastCharacter | |||||||
8A23 | CALL PrintScreen | Call PrintScreen. | ||||||
8A26 | INC DE | Increment DE by one. | ||||||
8A27 | EXX | Switch to the shadow registers. | ||||||
8A28 | EX AF,AF' | Switch to the shadow AF register. | ||||||
8A29 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
8A2A | INC L | Increment L by one. | ||||||
8A2B | EX AF,AF' | Switch to the shadow AF register. | ||||||
8A2C | JR PrintString_Loop | Jump to PrintString_Loop. | ||||||
Because the last character contains the terminator, it needs to be handled separately.
|
||||||||
PrintString_LastCharacter | 8A2E | AND %01111111 | Keep only bits 0-6 (i.e. strip the bit 7 terminator). | |||||
8A30 | CALL PrintScreen | Call PrintScreen. | ||||||
8A33 | EXX | Switch to the shadow registers. | ||||||
8A34 | EX AF,AF' | Switch to the shadow AF register. | ||||||
8A35 | LD (HL),A | Copy the attribute byte to the screen. | ||||||
8A36 | RET | Return. | ||||||
Prev: 89EF | Up: Map | Next: 8A37 |