![]()  | 
Routines | 
| Prev: 40849 | Up: Map | Next: 41356 | 
| 
 
Used by the routine at HandlerPoems.
 
  | 
||||||||||||||||||||||||
| DisplayPoem | 40987 | LD A,(IX+11) | Fetch the current number of amulet pieces which need to be collected. | |||||||||||||||||||||
| 
 
Convert "number of pieces to collect" into "number of pieces collected".
 
 | 
||||||||||||||||||||||||
| 40990 | LD BC,1024 | BC=1024 counter = 4 (total number of pieces) and initialise C to 0. | ||||||||||||||||||||||
| Poem_CollectCollected_Loop | 40993 | RRCA | The number of amulet pieces which need to be collected is held in bits, so rotate A and if there are no bits to carry over then jump to Poem_CollectCollected_Skip. | |||||||||||||||||||||
| 40994 | JR NC,Poem_CollectCollected_Skip | |||||||||||||||||||||||
| 40996 | INC C | Increment C by one. | ||||||||||||||||||||||
| Poem_CollectCollected_Skip | 40997 | DJNZ Poem_CollectCollected_Loop | Decrease counter by one and loop back to Poem_CollectCollected_Loop until counter is zero. | |||||||||||||||||||||
| 40999 | LD A,C | A=C (the number of amulet pieces collected). | ||||||||||||||||||||||
| 
 
Check if poem "1" should be displayed.
 
 | 
||||||||||||||||||||||||
| 41000 | DEC A | Decrease A by one and jump to Poem_1_Reference if A is now zero. | ||||||||||||||||||||||
| 41001 | JR Z,Poem_1_Reference | |||||||||||||||||||||||
| 
 
Check if poem "2" should be displayed.
 
 | 
||||||||||||||||||||||||
| 41003 | DEC A | Decrease A by one and jump to Poem_2_Reference if A is now zero. | ||||||||||||||||||||||
| 41004 | JR Z,Poem_2_Reference | |||||||||||||||||||||||
| 
 
Check if poem "3" should be displayed.
 
 | 
||||||||||||||||||||||||
| 41006 | DEC A | Decrease A by one and jump to Poem_3_Reference if A is now zero. | ||||||||||||||||||||||
| 41007 | JR Z,Poem_3_Reference | |||||||||||||||||||||||
| 
 
Handles pointing to poem "4".
 
 | 
||||||||||||||||||||||||
| 41009 | LD DE,41275 | DE=Poem_4_Copy. | ||||||||||||||||||||||
| 
 
Each poem is four lines of prose.
 
 | 
||||||||||||||||||||||||
| Poem_Start | 41012 | LD B,4 | B=4. | |||||||||||||||||||||
| 
 
This entry point is used by the routine at GameComplete.
 
 | 
||||||||||||||||||||||||
| Poem_Loop | 41014 | EX DE,HL | ||||||||||||||||||||||
| 41015 | LD E,(HL) | |||||||||||||||||||||||
| 41016 | INC HL | |||||||||||||||||||||||
| 41017 | LD D,(HL) | |||||||||||||||||||||||
| 41018 | INC HL | |||||||||||||||||||||||
| 41019 | EX DE,HL | |||||||||||||||||||||||
| 41020 | PUSH BC | Stash BC on the stack. | ||||||||||||||||||||||
| 41021 | CALL PrintStringColour | Call PrintStringColour. | ||||||||||||||||||||||
| 41024 | EXX | Switch to the shadow registers. | ||||||||||||||||||||||
| 41025 | INC DE | Increment DE by one. | ||||||||||||||||||||||
| 41026 | POP BC | Restore BC from the stack. | ||||||||||||||||||||||
| 41027 | DJNZ Poem_Loop | Decrease counter by one and loop back to Poem_Loop until counter is zero. | ||||||||||||||||||||||
| 41029 | RET | Return. | ||||||||||||||||||||||
| 
 
Handles pointing to poem "1".
 
 | 
||||||||||||||||||||||||
| Poem_1_Reference | 41030 | LD DE,41045 | DE=Poem_1_Copy. | |||||||||||||||||||||
| 41033 | JR Poem_Start | Jump to Poem_Start. | ||||||||||||||||||||||
| 
 
Handles pointing to poem "2".
 
 | 
||||||||||||||||||||||||
| Poem_2_Reference | 41035 | LD DE,41127 | DE=Poem_2_Copy. | |||||||||||||||||||||
| 41038 | JR Poem_Start | Jump to Poem_Start. | ||||||||||||||||||||||
| 
 
Handles pointing to poem "3".
 
 | 
||||||||||||||||||||||||
| Poem_3_Reference | 41040 | LD DE,41204 | DE=Poem_3_Copy. | |||||||||||||||||||||
| 41043 | JR Poem_Start | Jump to Poem_Start. | ||||||||||||||||||||||
| 
 
Poem 1.  
  | 
||||||||||||||||||||||||
| Poem_1_Copy | 41045 | DEFB 32,128 | X / Y position. | |||||||||||||||||||||
| 41047 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41048 | DEFM "ONE PIECE IS ALL THAT YO","U"+128 | "ONE PIECE IS ALL THAT YOU". | ||||||||||||||||||||||
| 41073 | DEFB 88,144 | X / Y position. | ||||||||||||||||||||||
| 41075 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41076 | DEFM "HAVE FOUN","D"+128 | "HAVE FOUND". | ||||||||||||||||||||||
| 41086 | DEFB 40,160 | X / Y position. | ||||||||||||||||||||||
| 41088 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41089 | DEFM "COLLECT THREE MORE AN","D"+128 | "COLLECT THREE MORE AND". | ||||||||||||||||||||||
| 41111 | DEFB 72,176 | X / Y position. | ||||||||||||||||||||||
| 41113 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41114 | DEFM "OUTWARD BOUN","D"+128 | "OUTWARD BOUND". | ||||||||||||||||||||||
| 
 
Poem 2.  
  | 
||||||||||||||||||||||||
| Poem_2_Copy | 41127 | DEFB 24,128 | X / Y position. | |||||||||||||||||||||
| 41129 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41130 | DEFM "TWO PIECES FOUND ARE YOUR","S"+128 | "TWO PIECES FOUND ARE YOURS". | ||||||||||||||||||||||
| 41156 | DEFB 96,144 | X / Y position. | ||||||||||||||||||||||
| 41158 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41159 | DEFM "TO KEE","P"+128 | "TO KEEP". | ||||||||||||||||||||||
| 41166 | DEFB 32,160 | X / Y position. | ||||||||||||||||||||||
| 41168 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41169 | DEFM "THIS SCORE AGAIN IS WHA","T"+128 | "THIS SCORE AGAIN IS WHAT". | ||||||||||||||||||||||
| 41193 | DEFB 96,176 | X / Y position. | ||||||||||||||||||||||
| 41195 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41196 | DEFM "YOU SEE","K"+128 | "YOU SEEK". | ||||||||||||||||||||||
| 
 
Poem 3.  
  | 
||||||||||||||||||||||||
| Poem_3_Copy | 41204 | DEFB 56,128 | X / Y position. | |||||||||||||||||||||
| 41206 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41207 | DEFM "ONE PIECE MORE MUS","T"+128 | "ONE PIECE MORE MUST". | ||||||||||||||||||||||
| 41226 | DEFB 96,144 | X / Y position. | ||||||||||||||||||||||
| 41228 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41229 | DEFM "YOU AMAS","S"+128 | "YOU AMASS". | ||||||||||||||||||||||
| 41238 | DEFB 40,160 | X / Y position. | ||||||||||||||||||||||
| 41240 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41241 | DEFM "AND FIND THE KEEPER YO","U"+128 | "AND FIND THE KEEPER YOU". | ||||||||||||||||||||||
| 41264 | DEFB 96,176 | X / Y position. | ||||||||||||||||||||||
| 41266 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41267 | DEFM "MAY PAS","S"+128 | "MAY PASS". | ||||||||||||||||||||||
| 
 
Poem 4.  
  | 
||||||||||||||||||||||||
| Poem_4_Copy | 41275 | DEFB 24,128 | X / Y position. | |||||||||||||||||||||
| 41277 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41278 | DEFM "FOUR PIECES FOUND HAVE NO","W"+128 | "FOUR PIECES FOUND HAVE NOW". | ||||||||||||||||||||||
| 41304 | DEFB 88,144 | X / Y position. | ||||||||||||||||||||||
| 41306 | DEFB 71 | Attribute. | ||||||||||||||||||||||
| 41307 | DEFM "MADE WHOL","E"+128 | "MADE WHOLE". | ||||||||||||||||||||||
| 41317 | DEFB 32,160 | X / Y position. | ||||||||||||||||||||||
| 41319 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41320 | DEFM "TO FIND THE CAVE MUST B","E"+128 | "TO FIND THE CAVE MUST BE". | ||||||||||||||||||||||
| 41344 | DEFB 88,176 | X / Y position. | ||||||||||||||||||||||
| 41346 | DEFB 69 | Attribute. | ||||||||||||||||||||||
| 41347 | DEFM "YOUR GOA","L"+128 | "YOUR GOAL". | ||||||||||||||||||||||
| Prev: 40849 | Up: Map | Next: 41356 |