Prev: 40834 Up: Map Next: 41040
40852: Routine at 9F94
Used by the routine at YouSeeEntry.
40852 PUSH IY Stash IY, AF and BC on the stack.
40854 PUSH AF
40855 PUSH BC
40856 LD HL,45059 HL="You see :[0x14]"
40859 CALL PrintMsg Call PrintMsg.
40862 LD A,255 A=$FF.
40864 LD IY,(46860) IY=ptrCurObject.
40868 LD B,(IY+16) B=location ID of the object.
40871 CALL 40879 Call 40879.
40874 POP BC Restore BC, AF and IY off the stack.
40875 POP AF
40876 POP IY
40878 RET Return.
This entry point is used by the routines at Action_Look, Action_Inventory and 37134.
40879 PUSH IY Stash IY, DE and BC on the stack.
40881 PUSH DE
40882 PUSH BC
40883 LD C,0
40885 LD D,4
40887 CALL 40903 Call 40903.
40890 SUB A
40891 CP C
40892 LD HL,45883 HL=" {6} nothing"
40895 CALL Z,PrintMsg Call 40879 if zero.
40898 POP BC Restore BC, DE and IY off the stack.
40899 POP DE
40900 POP IY
40902 RET Return.
40903 PUSH HL
40904 LD L,A
40905 LD A,(34463)
40908 LD H,A
40909 LD A,D
40910 LD (34463),A
40913 LD A,L
40914 EX (SP),HL
40915 PUSH IX Stash IX on the stack.
40917 LD IX,49248 Set IX to $C060 which is 3 bytes less than the start of the object table due to the following line adding $0003 and moving us on to the first record.
40921 CALL Step3ByteTable_Next Call Step3ByteTable_Next.
40924 JR Z,41030
40926 CP (IY+1)
40929 JR NZ,40921
40931 PUSH AF
40932 INC A
40933 LD E,(IY+0)
40936 JR NZ,40943
40938 LD A,1
40940 CP E
40941 JR NZ,41021
40943 LD A,(IY+16)
40946 CP B
40947 JR Z,40958
40949 DEC E
40950 JR Z,41021
40952 LD A,(IY+17)
40955 CP B
40956 JR NZ,41021
40958 LD A,(46826)
40961 CP (IX+0)
40964 JR NZ,40971
40966 LD A,4
40968 CP D
40969 JR Z,41021
40971 LD A,(IX+0)
40974 CALL 40500 Call 40500.
40977 JR Z,41021
40979 INC C
40980 SUB A
40981 LD (46852),A
40984 LD (46851),A
40987 CALL 40647 Call 40647.
40990 LD A,(46826)
40993 CP (IX+0)
40996 JR Z,41025
40998 LD A,46
41000 CALL 34187 Call 34187.
41003 LD A,(IX+0)
41006 CALL 41040 Call 41040.
41009 JR C,41021
41011 LD A,(IX+0)
41014 PUSH DE
41015 INC D
41016 INC D
41017 CALL 40903 Call 40903.
41020 POP DE
41021 POP AF
41022 JP 40921
41025 CALL 34179 Call 34179.
41028 JR 41021
41030 POP IX
41032 EX (SP),HL
41033 LD A,H
41034 LD (34463),A
41037 LD A,L
41038 POP HL
41039 RET Return.
Prev: 40834 Up: Map Next: 41040