![]() |
Routines |
| 63668 | PUSH HL | |
| 63669 | LD HL,32747 | 32747=shield counter |
| 63672 | LD (HL),15 | Restore the shield counter to 15 |
| 63674 | DEC L | HL=32746 (shield status) |
| 63675 | INC (HL) | A=1 if the game has just started, 2 if the 15th shield was just flashed, 3 if the safe was just opened, or 4 if the 15th shield was just unflashed |
| 63676 | LD A,(HL) | |
| 63677 | LD HL,(32708) | HL=score |
| 63680 | CP 4 | Was the 15th shield just unflashed? |
| 63682 | JR NZ,63704 | Jump if not |
| 63684 | LD DE,500 | Add 5000 to the score and print it |
| 63687 | ADD HL,DE | |
| 63688 | CALL 62705 | |
| 63691 | LD HL,65248 | Print 'WELL DONE! GO UP A YEAR' in the lesson box |
| 63694 | CALL 63919 | |
| 63697 | LD A,12 | Set the MSB of the lesson time counter to 12 |
| 63699 | LD (32760),A | |
| 63702 | LD A,1 | |
| 63704 | DEC A | Was the 15th shield just flashed or the safe just opened? |
| 63705 | JR NZ,63718 | Jump if so |
| 63707 | CALL 63573 | Generate a new safe combination code |
| 63710 | CALL 63242 | Unflash the safe and all shields |
| 63713 | CALL 32400 | Play the theme tune |
| 63716 | POP HL | |
| 63717 | RET |
| 63718 | LD DE,100 | Add 1000 to the score |
| 63721 | ADD HL,DE | |
| 63722 | DEC A | Was the safe just opened? |
| 63723 | JR NZ,63726 | Jump if so |
| 63725 | ADD HL,DE | Add 1000 more to the score if the 15th shield was hit |
| 63726 | CALL 62705 | Print the new score |
| 63729 | CALL 32406 | Play the 'Got all the shields' tune |
| 63732 | POP HL | |
| 63733 | RET |