Prev: A2B5 Up: Map Next: A32B
A320: Find Sector Energy
Used by the routines at ReduceSectorEnergy and InstallProgram.
Finds the entry for the sector that an entity is in, in the table of sector energies.
Input
IX Entity
Output
DE Sector number
HL Address of the energy of the sector
FindSectorEnergy A320 CALL FindSector Find the sector using FindSector.
A323 LD E,A Put the sector number in E...
A324 LD D,$00 ...and clear D.
A326 LD HL,$A361 Point HL at SectorEnergy.
A329 ADD HL,DE Add the sector number.
A32A RET Return.
Prev: A2B5 Up: Map Next: A32B