Prev: 6807 Up: Map Next: 685B
680C: Action: Inventory
Prints message 10, you are carrying the following, then every carried or worn object. Nothing carried says so. A worn object is marked with message 1E.
Print "you are carrying the following:".
ListCarried 680C LD A,$10 Print SystemMessage_10 using PrintSystemMessage.
680E CALL PrintSystemMessage
6811 XOR A Write 00 to SearchHit.
6812 LD ($5B7A),A
6815 LD B,$A0 A0 object slots.
6817 LD HL,$5DCA Point HL at ObjectLocations.
Scan the object locations.
ListCarried_Scan 681A LD A,($5D89) Call ListCarried_One if it is *CarriedObject.
681D CP (HL)
681E CALL Z,ListCarried_One
6821 LD A,($5D8A) Call ListCarried_One if it is *WornObject.
6824 CP (HL)
6825 CALL Z,ListCarried_One
6828 INC HL The next object.
6829 DJNZ ListCarried_Scan Jump to ListCarried_Scan until every slot is done.
682B LD A,($5B7A) Jump to ListCarried_End if *SearchHit is set.
682E OR A
682F JR NZ,ListCarried_End
Print "nothing at all.".
6831 LD A,$11 Print SystemMessage_11 using PrintSystemMessage.
6833 JP PrintSystemMessage
Finish the inventory list.
ListCarried_End 6836 LD A,$0C Two backspaces remove the trailing comma.
6838 CALL PrintCharacter
683B LD A,$0C
683D CALL PrintCharacter
6840 LD A,$2E A full stop ends the list.
6842 JP PrintCharacter
Print one carried or worn object.
ListCarried_One 6845 LD A,$A0 The object id is A0 minus the countdown.
6847 SUB B
6848 CALL PrintObjectName Call PrintObjectName.
684B LD ($5B7A),A Write it to *SearchHit.
684E LD A,($5D8A) Return if it is not *WornObject.
6851 CP (HL)
6852 RET NZ
6853 PUSH BC Stash the countdown on the stack.
Print " (worn),".
6854 LD A,$1E Print SystemMessage_1E using PrintSystemMessage.
6856 CALL PrintSystemMessage
6859 POP BC Restore the countdown from the stack.
685A RET Return.
Prev: 6807 Up: Map Next: 685B