Prev: BB73 Up: Map Next: BCB7
BC96: Handler: Bonus Messaging
Used by the routine at BB73.
Input
HL Pointer to bonus messaging
Fetch the message string from *HL.
Handler_BonusMessaging BC96 LD E,(HL) E=*HL.
BC97 INC HL Increment HL by one.
BC98 LD D,(HL) D=*HL.
BC99 INC HL Increment HL by one.
BC9A LD ($C38A),HL Write HL to *BonusMessaging.
BC9D EX DE,HL Exchange the DE register with the shadow HL register.
This entry point is used by the routines at B4B8, BB73, Handler_BittenByDog and Handler_HitByBike.
Print_BonusMessaging BC9E LD DE,$50C0 DE=50C0 (screen buffer location).
BCA1 LD A,$00 Write 00 to *C388.
BCA3 LD ($C388),A
BCA6 CALL PrintString Call PrintString.
BCA9 EX DE,HL Switch the DE and HL registers back to normal.
The messaging appears right at the bottom of the screen. This code blanks out the rest of the two lines to overwrite any existing messaging.
Print_BonusMessaging_Blank BCAA LD B,$08 B=08 (eight lines in a character block).
BCAC PUSH HL Remember where we are on the screen.
Clearing the character block.
Print_BonusMessaging_Loop BCAD LD (HL),$00 Write 00 to *HL.
BCAF INC H Move down one line.
BCB0 DJNZ Print_BonusMessaging_Loop Decrease counter by one and loop back to Print_BonusMessaging_Loop until counter is zero.
BCB2 POP HL Restore the screen location where we started for this pass (the top of this character block).
BCB3 INC L Move right one character block.
Keep going until the end of the screen is reached.
BCB4 JR NZ,Print_BonusMessaging_Blank Jump to Print_BonusMessaging_Blank if L is not zero.
BCB6 RET Return.
Prev: BB73 Up: Map Next: BCB7