![]() |
Routines |
| Prev: BF6A | Up: Map | Next: BF92 |
|
Finds the address of an entity from its number. The entities are 10 bytes long and this uses 08, so it does not work. It is not used.
|
||||||||||||
| GetEntityAddress | BF7E | PUSH BC | Save BC. | |||||||||
| BF7F | LD C,A | Put the entity number in BC. | ||||||||||
| BF80 | LD B,$00 | |||||||||||
| BF82 | PUSH BC | Move it into IY. | ||||||||||
| BF83 | POP IY | |||||||||||
| BF85 | ADD IY,IY | Multiply it by eight. | ||||||||||
| BF87 | ADD IY,IY | |||||||||||
| BF89 | ADD IY,IY | |||||||||||
| BF8B | LD BC,$9690 | Add the address of the first entity. | ||||||||||
| BF8E | ADD IY,BC | |||||||||||
| BF90 | POP BC | Restore BC. | ||||||||||
| BF91 | RET | Return. | ||||||||||
| Prev: BF6A | Up: Map | Next: BF92 |