Routines
| Prev: CDA1 | Up: Map | Next: CE18 |
CDBF: Plan opcode 4, ASK: order another character to do something
|
Verb 46 (TALK TO) with the person as the direct object; queues an 8-byte node on the list at 9FEE (person, $FF, verb, dobj, iobj) and prints 682A, which quotes the order: the cabbie is told 'HAIL THE HANSOM CAB' this way, for example. The person carries the order out on its next turn (CCA7).
With the player moved to Inspector Lestrade at the start, his script hails a hansom cab, climbs in, and at 8:04 runs ASK (bytes 44 FA 1D FC FF: the person is the plan's remembered thing, here the cabbie; verb 29 GO TO; the plan's indirect object, a room); CE10 then prints 'Inspector Lestrade remarks to the cabbie " Go to Kings Cross Road. "'.
|
||||||||||||
| CDBF | LD A,$2E | Load A with $2E - Verb 46, TALK TO | ||||||||||
| CDC1 | LD ($A033),A | Store A in $A033 in "Game variables" | ||||||||||
| CDC4 | LD A,(IX+$01) | Read byte +1 of the record at IX into A - Who is ordered | ||||||||||
| CDC7 | CALL $CEDE | Call the routine "Resolve a plan argument byte" (CEDE) | ||||||||||
| CDCA | LD ($A034),A | Store A in $A034 in "Game variables" | ||||||||||
| CDCD | LD A,(IX+$02) | Read byte +2 of the record at IX into A - The verb ordered | ||||||||||
| CDD0 | LD ($A35D),A | Store A in "A remembered command: verb, direct object,..." (A35D) | ||||||||||
| CDD3 | LD A,(IX+$03) | Read byte +3 of the record at IX into A - Its direct object | ||||||||||
| CDD6 | CALL $CEDE | Call the routine "Resolve a plan argument byte" (CEDE) | ||||||||||
| CDD9 | LD ($A35E),A | Store A in A35E in "A remembered command: verb, direct object,..." | ||||||||||
| CDDC | LD A,(IX+$04) | Read byte +4 of the record at IX into A - Its indirect object | ||||||||||
| CDDF | CALL $CEDE | Call the routine "Resolve a plan argument byte" (CEDE) | ||||||||||
| CDE2 | LD ($A35F),A | Store A in A35F in "A remembered command: verb, direct object,..." | ||||||||||
| CDE5 | LD A,$08 | Load A with $08 - Allocate an 8-byte order node | ||||||||||
| CDE7 | CALL $A11C | Call the routine "Allocate A + 3 bytes from the free list, cleared" (A11C) | ||||||||||
| CDEA | LD A,($A034) | Read $A034 in "Game variables" into A - Fill it in | ||||||||||
| CDED | LD (IX+$00),A | Store A in the first byte of the record at IX | ||||||||||
| CDF0 | LD (IX+$01),$FF | Set byte +1 of the record at IX to $FF | ||||||||||
| CDF4 | LD A,($A35D) | Read "A remembered command: verb, direct object,..." (A35D) into A | ||||||||||
| CDF7 | LD (IX+$02),A | Store A in byte +2 of the record at IX | ||||||||||
| CDFA | LD HL,($A35E) | Read A35E in "A remembered command: verb, direct object,..." into HL | ||||||||||
| CDFD | LD (IX+$03),L | Store L in byte +3 of the record at IX | ||||||||||
| CE00 | LD (IX+$04),H | Store H in byte +4 of the record at IX | ||||||||||
| CE03 | LD HL,($9FEE) | Read orders and remarks (9FEE) into HL - Link it in at the head of the 9FEE list | ||||||||||
| CE06 | LD ($9FEE),IX | Store IX in orders and remarks (9FEE) | ||||||||||
| CE0A | LD (IX-$02),L | Store L in byte -2 of the record at IX | ||||||||||
| CE0D | LD (IX-$01),H | Store H in byte -1 of the record at IX | ||||||||||
| CE10 | LD HL,$682A | Point HL at the message "YOU SAY TO THE OIL LAMP" HAIL THE HANSOM CAB."." (682A) - Quote the order | ||||||||||
| CE13 | CALL $A59F | Call the routine "Print the message at HL" (A59F) | ||||||||||
| CE16 | JR $CE8F | Succeed | ||||||||||
| Prev: CDA1 | Up: Map | Next: CE18 |