Routines |
Prev: 9BA9 | Up: Map | Next: 9BCA |
Used by the routines at 70F3, Action_Dir, YouSeeEntry, 9C41, GetObjectLocationInIX, 9EA0, A0AE and A55F.
|
||||||||||||
LocateLocation | 9BB1 | CP $50 | If the location ID is less than $50 jump to LocateLocation_Action to process it. | |||||||||
9BB3 | JR C,LocateLocation_Action | |||||||||||
9BB5 | XOR A | Reset A to $00. | ||||||||||
9BB6 | RET | Return. | ||||||||||
Work out the location now A is validated as a legitimate location ID.
|
||||||||||||
LocateLocation_Action | 9BB7 | PUSH DE | Stash DE on the stack. | |||||||||
9BB8 | LD DE,$B9E0 | DE=LocationTable | ||||||||||
9BBB | PUSH HL | Stash HL on the stack. | ||||||||||
9BBC | LD L,A | Store offset in the HL register pair. | ||||||||||
9BBD | LD H,$00 | |||||||||||
9BBF | ADD HL,HL | HL=(HL * $02)+DE | ||||||||||
9BC0 | ADD HL,DE | |||||||||||
9BC1 | LD E,(HL) | DE=the location from the pointer in HL. | ||||||||||
9BC2 | INC HL | |||||||||||
9BC3 | LD D,(HL) | |||||||||||
9BC4 | PUSH DE | IX=DE using the stack. | ||||||||||
9BC5 | POP IX | |||||||||||
9BC7 | POP HL | Restore HL and DE off the stack. | ||||||||||
9BC8 | POP DE | |||||||||||
9BC9 | RET | Return. |
Prev: 9BA9 | Up: Map | Next: 9BCA |