|  | Routines | 
| Prev: 95ED | Up: Map | Next: 96B3 | 
| 
Used by the routine at Action_Dir.
 | ||||
| YouSeeEntry | 962B | LD HL,$B000 | HL="You see[0x16]". | |
| 962E | JR YouSeeWrapper | Jump to YouSeeWrapper. | ||
| 
This entry point is used by the routines at Action_Look, Action_Dir and ActionClimbOut.
 | ||||
| YouSeePreposition | 9630 | PUSH AF | Stash AF on the stack. | |
| 9631 | CALL LocateLocation | Call LocateLocation. | ||
| 9634 | LD A,(IX+$00) | Fetch the location attribute, keep only bits 1-3 which signify the location preposition ("IN", "ON", "AT", etc). | ||
| 9637 | AND %00001110 | |||
| 9639 | LD E,A | Create an offset for the preposition word look-up. | ||
| 963A | LD D,$00 | |||
| 963C | LD HL,$BA80 | Add the offset to BA80. | ||
| 963F | ADD HL,DE | |||
| 9640 | LD E,(HL) | Fetch the referenced text bytes which display the preposition word. | ||
| 9641 | INC HL | |||
| 9642 | LD D,(HL) | |||
| 9643 | LD HL,$AFFD | Write the text tokens to $AFFD which updates the copy for "You are XXXX[0x16]". | ||
| 9646 | LD (HL),D | |||
| 9647 | INC HL | |||
| 9648 | LD (HL),E | |||
| 9649 | POP AF | Restore AF from the stack. | ||
| 964A | LD HL,$AFFC | HL="You are in[0x16]". | ||
| 
This entry point is used by the routine at ActionCapture.
 | ||||
| YouSeeWrapper | 964D | PUSH IX | Stash IX, IY and BC on the stack. | |
| 964F | PUSH IY | |||
| 9651 | PUSH BC | |||
| 9652 | CALL YouSeeStart | Call YouSeeStart. | ||
| 9655 | POP BC | Restore BC, IY and IX from the stack. | ||
| 9656 | POP IY | |||
| 9658 | POP IX | |||
| 965A | RET | Return. | ||
| 
From here starts the "intro" to a location;  
 | ||||
| YouSeeStart | 965B | LD B,A | Store A in B temporarily. | |
| 965C | CALL LocateLocation | Call LocateLocation to set IX to point to the appropriate location data for the current location. | ||
| 965F | CALL PrintMsg | Call PrintMsg. | ||
| 9662 | LD L,(IX+$08) | Load the location data offset for the current location description. | ||
| 9665 | LD H,(IX+$09) | |||
| 9668 | LD A,H | Check that there is a value for the description, set zero flag if not. | ||
| 9669 | OR L | |||
| 966A | CALL YouSeePrint | Call YouSeePrint. | ||
| 966D | LD A,B | Restore the previous value of A (the location ID). | ||
| 966E | CALL Drawing | Call Drawing. | ||
| 9671 | LD A,($7F77) | Test if LocationID contains $FF, call WaitForKey2 if it does not (i.e. wait for a keypress only if something has been drawn). | ||
| 9674 | INC A | |||
| 9675 | CALL NZ,WaitForKey2 | |||
| 9678 | CALL $8583 | Call 8583. | ||
| 967B | LD A,B | Restore the previous value of A (the location ID). | ||
| 967C | CALL $A0C8 | Call A0C8. | ||
| YouSeeExits | 967F | LD A,B | Restore the previous value of A (the location ID). | |
| 9680 | CALL DisplayExits | Call DisplayExits. | ||
| 9683 | JP $9F94 | Jump to 9F94. | ||
| YouSeePrint | 9686 | JP NZ,PrintMsg | Print the location description if one is present. | |
| YouSeeNext | 9689 | LD DE,$0002 | DE=$0002. | |
| 968C | PUSH IY | Stash IY on the stack. | ||
| 968E | PUSH IX | IY=IX. | ||
| 9690 | POP IY | |||
| 9692 | ADD IY,DE | IY=IY + $0002 (from DE). | ||
| 9694 | CALL $9ED6 | Call 9ED6. | ||
| 9697 | POP IY | Restore IY from the stack. | ||
| 9699 | RET | Return. | ||
| 
This is almost a carbon copy of WaitForKey only differing in that it ends with a return.
 | ||||
| WaitForKey2 | 969A | XOR A | Read from the keyboard port. | |
| 969B | IN A,($FE) | |||
| 969D | AND %00011111 | A pressed key from any line will set its respective bit; bit 0 (outer key) to bit 4 (inner key). Hence keep only bits 0-4 for the check. | ||
| 969F | CP $1F | Loop back to WaitForKey2 until any key has been pressed. | ||
| 96A1 | JR Z,WaitForKey2 | |||
| 96A3 | LD A,$07 | Set the border to white. | ||
| 96A5 | OUT ($FE),A | |||
| 96A7 | RET | Return. | ||
| 
This entry point is used by the routine at Action_Dir.
 | ||||
| YouSeeController | 96A8 | CALL LocateLocation | Call LocateLocation. | |
| 96AB | CALL YouSeeNext | Call YouSeeNext. | ||
| 96AE | CALL $8583 | Call 8583. | ||
| 96B1 | JR YouSeeExits | Jump to YouSeeExits. | ||
| Prev: 95ED | Up: Map | Next: 96B3 |