Routines |
Prev: 45171 | Up: Map | Next: 45217 |
Used by the routines at GameMenu, Player_Name, 43066, Handler_Yes_No, Handler_StreetIntroduction, Handler_NewsFlash, FinishedStreet, Print_YoureFired, FiredScreen, Print_HighScoreTable, Messaging_GameOver, Play_Window and Handler_BonusMessaging.
|
||||
PrintString | 45185 | LD A,(HL) | A=*HL. | |
PrintString_Loop | 45186 | PUSH DE | Stash DE and HL on the stack. | |
45187 | PUSH HL | |||
Create an offset in HL.
|
||||
45188 | LD L,A | L=A. | ||
45189 | LD H,0 | H=0. | ||
45191 | ADD HL,HL | HL*=8. | ||
45192 | ADD HL,HL | |||
45193 | ADD HL,HL | |||
45194 | LD BC,58391 | BC=Font. | ||
45197 | DEC B | Decrease B by one. | ||
45198 | ADD HL,BC | HL+=BC. | ||
45199 | LD B,8 | B=8. | ||
PrintString_Copy | 45201 | LD A,(HL) | A=*HL. | |
45202 | LD (DE),A | Write A to *DE. | ||
45203 | INC HL | Increment HL by one. | ||
45204 | INC D | Increment D by one. | ||
45205 | DJNZ PrintString_Copy | Decrease counter by one and loop back to PrintString_Copy until counter is zero. | ||
45207 | POP HL | Restore HL and DE from the stack. | ||
45208 | POP DE | |||
45209 | INC DE | Increment DE by one. | ||
45210 | INC HL | Increment HL by one. | ||
45211 | LD A,(HL) | A=*HL. | ||
45212 | BIT 7,A | Return if bit 7 is set (the terminator). | ||
45214 | RET NZ | |||
45215 | JR PrintString_Loop | Jump to PrintString_Loop. |
Prev: 45171 | Up: Map | Next: 45217 |