Routines 
Prev: 54132  Up: Map  Next: 54162 


54148  LD A,B  Load ycoordinate into A  
54149  ADD A,A  Multiply this by 8...  
54150  ADD A,A  ...  
54151  ADD A,A  ...  
54152  LD L,A  Copy 8 times ycoordinate into HL...  
54153  LD H,0  ...  
54155  ADD HL,HL  Multiply by 4...  
54156  ADD HL,HL  ...to give 32 times original ycoordinate in HL  
The operand of the instruction at 54157 determines whether we are dealing with the attribute file (88), or the current terrain interaction data (94). It is modified by the instructions at 54164 and 54172.


54157  LD D,88  Point DE at start of data, plus xcoordinate offset in C...  
54159  LD E,C  ...  
54160  ADD HL,DE  Add 32 times ycoordinate as offset in HL  
54161  RET  Return 
Prev: 54132  Up: Map  Next: 54162 