![]() |
Routines |
| Prev: 26631 | Up: Map | Next: 26715 |
|
Prints message 16, you are carrying the following, then every carried or worn object. Nothing carried says so. A worn object is marked with message 30.
|
||||
|
Print "you are carrying the following:".
|
||||
| ListCarried | 26636 | LD A,16 | Print SystemMessage_10 using PrintSystemMessage. | |
| 26638 | CALL PrintSystemMessage | |||
| 26641 | XOR A | Write 0 to SearchHit. | ||
| 26642 | LD (23418),A | |||
| 26645 | LD B,160 | 160 object slots. | ||
| 26647 | LD HL,24010 | Point HL at ObjectLocations. | ||
|
Scan the object locations.
|
||||
| ListCarried_Scan | 26650 | LD A,(23945) | Call ListCarried_One if it is *CarriedObject. | |
| 26653 | CP (HL) | |||
| 26654 | CALL Z,ListCarried_One | |||
| 26657 | LD A,(23946) | Call ListCarried_One if it is *WornObject. | ||
| 26660 | CP (HL) | |||
| 26661 | CALL Z,ListCarried_One | |||
| 26664 | INC HL | The next object. | ||
| 26665 | DJNZ ListCarried_Scan | Jump to ListCarried_Scan until every slot is done. | ||
| 26667 | LD A,(23418) | Jump to ListCarried_End if *SearchHit is set. | ||
| 26670 | OR A | |||
| 26671 | JR NZ,ListCarried_End | |||
|
Print "nothing at all.".
|
||||
| 26673 | LD A,17 | Print SystemMessage_11 using PrintSystemMessage. | ||
| 26675 | JP PrintSystemMessage | |||
|
Finish the inventory list.
|
||||
| ListCarried_End | 26678 | LD A,12 | Two backspaces remove the trailing comma. | |
| 26680 | CALL PrintCharacter | |||
| 26683 | LD A,12 | |||
| 26685 | CALL PrintCharacter | |||
| 26688 | LD A,46 | A full stop ends the list. | ||
| 26690 | JP PrintCharacter | |||
|
Print one carried or worn object.
|
||||
| ListCarried_One | 26693 | LD A,160 | The object id is 160 minus the countdown. | |
| 26695 | SUB B | |||
| 26696 | CALL PrintObjectName | Call PrintObjectName. | ||
| 26699 | LD (23418),A | Write it to *SearchHit. | ||
| 26702 | LD A,(23946) | Return if it is not *WornObject. | ||
| 26705 | CP (HL) | |||
| 26706 | RET NZ | |||
| 26707 | PUSH BC | Stash the countdown on the stack. | ||
|
Print " (worn),".
|
||||
| 26708 | LD A,30 | Print SystemMessage_1E using PrintSystemMessage. | ||
| 26710 | CALL PrintSystemMessage | |||
| 26713 | POP BC | Restore the countdown from the stack. | ||
| 26714 | RET | Return. | ||
| Prev: 26631 | Up: Map | Next: 26715 |