Prev: 9B3E Up: Map Next: 9D23
9CC6: Print Rooms Visited
Used by the routine at GameOver_1UP.
PrintRoomsVisited 9CC6 LD DE,$0000 DE=0000.
9CC9 LD BC,$0820 BC=0820.
9CCC LD HL,$96BF HL=VisitedRooms.
PrintRoomsVisited_0 9CCF PUSH BC Stash BC on the stack.
9CD0 LD A,(HL)
9CD1 INC HL
PrintRoomsVisited_1 9CD2 RRCA
9CD3 JR NC,PrintRoomsVisited_2
9CD5 INC DE
PrintRoomsVisited_2 9CD6 DJNZ PrintRoomsVisited_1
9CD8 POP BC
9CD9 DEC C
9CDA JR NZ,PrintRoomsVisited_0
9CDC LD A,($970D) A=970D.
9CDF LD B,$04 B=04.
PrintRoomsVisited_3 9CE1 RRCA
9CE2 JR NC,PrintRoomsVisited_4
9CE4 INC DE
PrintRoomsVisited_4 9CE5 DJNZ PrintRoomsVisited_3
9CE7 LD BC,$6276 BC=6276.
9CEA LD HL,$0000 HL=0000.
9CED XOR A
PrintRoomsVisited_5 9CEE ADD HL,BC
9CEF ADC A,$00
9CF1 DAA
9CF2 DEC DE
9CF3 PUSH AF
9CF4 LD A,E
9CF5 OR D
9CF6 JR Z,PrintRoomsVisited_6
9CF8 POP AF
9CF9 JR PrintRoomsVisited_5 Jump to PrintRoomsVisited_5.
PrintRoomsVisited_6 9CFB POP AF
9CFC LD BC,$0028
9CFF ADD HL,BC
9D00 ADC A,$00
9D02 DAA
9D03 LD ($96B7),A
9D06 LD A,$00
9D08 ADC A,$00
9D0A DAA
9D0B LD ($96B6),A
9D0E LD HL,$48F8 HL=48F8.
9D11 LD DE,$96B6 DE=96B6.
9D14 LD B,$01 B=01.
9D16 LD A,(DE)
9D17 AND A
9D18 JR Z,PrintRoomsVisited_7
9D1A INC B
9D1B JP Score_1UP_0 Jump to Score_1UP_0.
PrintRoomsVisited_7 9D1E INC HL
9D1F INC DE
9D20 JP PrintScore_Loop Jump to PrintScore_Loop.
View the equivalent code in;
Prev: 9B3E Up: Map Next: 9D23