![]() |
Routines |
| Prev: 6A81 | Up: Map | Next: 6AAD |
|
Wears the object. It must be carried and in this room, and it must not already be worn. The worn id replaces the object's location and the carried count drops.
|
||||
| WearObject | 6A83 | CALL ObjectAddress | Point at the object. Already worn is refused. | |
| 6A86 | LD A,($5D8A) | |||
| 6A89 | CP C | |||
| 6A8A | JR NZ,WearObject_Held | |||
| 6A8C | LD A,$1D | Message 1D: you are wearing it. | ||
| 6A8E | JP GetObject_Refuse | |||
| WearObject_Held | 6A91 | LD A,($5D89) | A carried object is taken off the carried count. | |
| 6A94 | CP C | |||
| 6A95 | JR Z,WearObject_Count | |||
| 6A97 | LD A,($5D87) | In this room, it can be worn. | ||
| 6A9A | CP C | |||
| 6A9B | JR Z,WearObject_Take | |||
| 6A9D | LD A,$16 | Message 16: it is not here. | ||
| 6A9F | JP GetObject_Refuse | |||
| WearObject_Count | 6AA2 | PUSH HL | One fewer object is carried. | |
| 6AA3 | LD HL,$5D8C | |||
| 6AA6 | DEC (HL) | |||
| 6AA7 | POP HL | |||
| WearObject_Take | 6AA8 | LD A,($5D8A) | The worn id replaces the object's location. | |
| 6AAB | LD (HL),A | |||
| 6AAC | RET | Return. | ||
| Prev: 6A81 | Up: Map | Next: 6AAD |