Prev: 7D27 Up: Map Next: 7DB6
7DA5: Create link list
Used by the routine at Area_Init.
Input
DE Address of meory to create list.
B Number of links to create.
C Size of each link in bytes.
Each link contains the address of the next link.
Last link holds 0 to show no more links.
LinkList_Create 7DA5 DEC B
LinkList_Create_0 7DA6 LD L,C Create address of next link.
7DA7 LD H,$00
7DA9 ADD HL,DE
7DAA EX DE,HL
7DAB LD (HL),E Store address in current link.
7DAC INC HL
7DAD LD (HL),D
7DAE DJNZ LinkList_Create_0 Repeat for each link.
7DB0 EX DE,HL Put 0000 into last link.
7DB1 XOR A
7DB2 LD (HL),A
7DB3 INC HL
7DB4 LD (HL),A
7DB5 RET
Prev: 7D27 Up: Map Next: 7DB6