Prev: 34265 Up: Map Next: 34512
34484: Load C with property of index A for all Magic Knight's carried objects, OR-ed together
Used by the routine at 34265.
Input
A Index of required property of objects
Output
C Flags of all objects held, OR-ed together
34484 LD (34500),A Modify instruction at 34499 with index of required property
34487 LD IX,25164 Point IX at Magic Knight's current inventory (carrying)
34491 LD BC,1280 Load B with 5 and C with 0 (i.e. reset all bits in C)
34494 LD A,(IX+0) If Magic Knight's current inventory slot is empty...
34497 OR A ...
34498 RET Z ...then return
The operand of the instruction at 34499 represents the index of the required property. This is modified by the instruction at 34484.
34499 LD E,1 Load E with index of required property
34501 CALL 33525 Point HL to the E-th byte of the A-th record in object properties table
34504 LD A,(HL) Load A with value of required property (flags)...
34505 OR C ...and set corresponding bits of C...
34506 LD C,A ...
34507 INC IX Advance IX to next inventory slot...
34509 DJNZ 34494 ...and loop back to 34494 for next object
34511 RET Return
Prev: 34265 Up: Map Next: 34512