Routines
| Prev: E5D8 | Up: Map | Next: E63E |
E5FD: Action record: RUN at $E08F; RUN at $E46B; internal verb 130 (IS HERE: is the direct object with the actor ($C863)?)
|
Internal verb 130, IS HERE. The header (flags $47) names a pre-check at E604, which is the whole test: where the actor is (C863) and where the direct object is (C863) - each being the place found by climbing out through open containers (C86E), handed back in the alternate A register, hence the EX AF,AF' - must be the same, and the direct object must not be the actor itself (E5F3); otherwise the record refuses (DC15). So a person in a cab IS HERE for someone in the same cab, and Lestrade's 'is the player in the police cab with me' (EA78) works the same way.
|
||||||||||||
| E5FD | DEFB $47,$00,$04,$E6 | Action record header: flags $47; bit 6: pre-check at E604; byte 1 $00 | ||||||||||
| E601 | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller | ||||||||||
| E603 | RET | Return to the caller | ||||||||||
| E604 | LD A,($A036) | Read $A036 in "Game variables" into A - The actor's place (C863), from A' | ||||||||||
| E607 | CALL $C863 | Call the routine "Is thing number A here? (C86E)" (C863) | ||||||||||
| E60A | EX AF,AF' | Swap AF with the shadow copy | ||||||||||
| E60B | LD B,A | Copy A into B | ||||||||||
| E60C | LD A,($A034) | Read $A034 in "Game variables" into A - The direct object's place | ||||||||||
| E60F | CALL $C863 | Call the routine "Is thing number A here? (C86E)" (C863) | ||||||||||
| E612 | EX AF,AF' | Swap AF with the shadow copy | ||||||||||
| E613 | CP B | Compare A with B - Not the same place: refuse (E5F0) | ||||||||||
| E614 | LD A,($A036) | Read $A036 in "Game variables" into A | ||||||||||
| E617 | JR $E5F0 | Go back to E5F0 | ||||||||||
|
This entry point is used by the routines at 9B25, E328, E370, E4C9, E63E, E654, E66F and E6BC.
|
||||||||||||
| E619 | LD C,A | Copy A into C - A = a holder. Look through things 1 to $6D... | ||||||||||
| E61A | LD B,$FF | Load B with $FF | ||||||||||
| E61C | INC B | Add one to B | ||||||||||
| E61D | LD A,B | Copy B into A | ||||||||||
| E61E | CP $6E | Compare A with $6E - None: Z | ||||||||||
| E620 | RET Z | If A equals $6E, return | ||||||||||
| E621 | CALL $D237 | Call the routine "Resolve an id (in A) to its full entity record" (D237) | ||||||||||
| E624 | LD A,(IX+$01) | Read byte +1 of the record at IX into A - ...for one that this holder holds (+1)... | ||||||||||
| E627 | CP C | Compare A with C | ||||||||||
| E628 | JR NZ,$E61C | If A differs from C, go back to E61C | ||||||||||
| E62A | LD HL,$0575 | Load HL with $0575 - ...and whose name is MONEY ($0575): found with IX = the purse (NZ) | ||||||||||
| E62D | LD A,(IX+$07) | Read byte +7 of the record at IX into A | ||||||||||
| E630 | CP L | Compare A with L | ||||||||||
| E631 | JR NZ,$E61C | If A differs from L, go back to E61C | ||||||||||
| E633 | LD A,(IX+$08) | Read byte +8 of the record at IX into A | ||||||||||
| E636 | AND $0F | Keep only bits 0, 1, 2, 3 of A (mask $0F) | ||||||||||
| E638 | CP H | Compare A with H | ||||||||||
| E639 | JR NZ,$E61C | If A differs from H, go back to E61C | ||||||||||
| E63B | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller | ||||||||||
| E63D | RET | Return to the caller | ||||||||||
| Prev: E5D8 | Up: Map | Next: E63E |