![]()  | 
Routines | 
| Prev: 39849 | Up: Map | Next: 39882 | 
| 
 
Used by the routines at 28915, Action_Dir, YouSeeEntry, 40001, GetObjectLocationInIX, 40608, 41134 and 42335.
 
 
  | 
||||||||||||
| LocateLocation | 39857 | CP 80 | If the location ID is less than 80 jump to LocateLocation_Action to process it. | |||||||||
| 39859 | JR C,LocateLocation_Action | |||||||||||
| 39861 | XOR A | Reset A to 0. | ||||||||||
| 39862 | RET | Return. | ||||||||||
| 
 
Work out the location now A is validated as a legitimate location ID.
 
 | 
||||||||||||
| LocateLocation_Action | 39863 | PUSH DE | Stash DE on the stack. | |||||||||
| 39864 | LD DE,47584 | DE=LocationTable | ||||||||||
| 39867 | PUSH HL | Stash HL on the stack. | ||||||||||
| 39868 | LD L,A | Store offset in the HL register pair. | ||||||||||
| 39869 | LD H,0 | |||||||||||
| 39871 | ADD HL,HL | HL=(HL * 2)+DE | ||||||||||
| 39872 | ADD HL,DE | |||||||||||
| 39873 | LD E,(HL) | DE=the location from the pointer in HL. | ||||||||||
| 39874 | INC HL | |||||||||||
| 39875 | LD D,(HL) | |||||||||||
| 39876 | PUSH DE | IX=DE using the stack. | ||||||||||
| 39877 | POP IX | |||||||||||
| 39879 | POP HL | Restore HL and DE off the stack. | ||||||||||
| 39880 | POP DE | |||||||||||
| 39881 | RET | Return. | ||||||||||
| Prev: 39849 | Up: Map | Next: 39882 |