| The Hobbit (v1.0) | Routines |
| Prev: 9589 | Up: Map | Next: 95B9 |
|
Prints the full description of room A. The message used for this is 'you are <preposition> ...' at AEEE, and before printing it this routine writes the room's preposition - OUTSIDE, INSIDE, IN, ON or AT, chosen by bits 1-3 of the room's first byte from B970 - into the message itself, at AEEF. So the text of the message is changed each time a room is described. 95B9 then does the rest.
|
||||||||
| 958E | PUSH AF | |||||||
| 958F | CALL $9B0C | IX = the room's record | ||||||
| 9592 | LD A,(IX+$00) | Bits 1-3 of its flags choose the preposition | ||||||
| 9595 | AND $0E | |||||||
| 9597 | LD E,A | |||||||
| 9598 | LD D,$00 | |||||||
| 959A | LD HL,$B970 | HL = the table of prepositions | ||||||
| 959D | ADD HL,DE | |||||||
| 959E | LD E,(HL) | DE = OUTSIDE, INSIDE, IN, ON or AT | ||||||
| 959F | INC HL | |||||||
| 95A0 | LD D,(HL) | |||||||
| 95A1 | LD HL,$AEEF | Write it into the message "you are ..." (high byte first) | ||||||
| 95A4 | LD (HL),D | |||||||
| 95A5 | INC HL | |||||||
| 95A6 | LD (HL),E | |||||||
| 95A7 | POP AF | |||||||
| 95A8 | LD HL,$AEEE | HL = that message | ||||||
|
This entry point is used by the routine at 9589.
|
||||||||
| 95AB | PUSH IX | |||||||
| 95AD | PUSH IY | |||||||
| 95AF | PUSH BC | } | ||||||
| 95B0 | CALL $95B9 | Describe the room | ||||||
| 95B3 | POP BC | |||||||
| 95B4 | POP IY | |||||||
| 95B6 | POP IX | |||||||
| 95B8 | RET | |||||||
| Prev: 9589 | Up: Map | Next: 95B9 |