Prev: F429 Up: Map Next: F472
F461: Creates a link list from a sequence of data blocks. The pointer to the next address (next block defined by C) is stored in the first word of the block.
Used by the routine at LinkListInit.
Input
B Number of memory blocks to link.
C Size of memory block
DE Address of first block.
LinkListCreate F461 DEC B Less one for loop.
LinkListCreate_Next F462 LD L,C Get address of next block.
F463 LD H,$00
F465 ADD HL,DE
F466 EX DE,HL
F467 LD (HL),E Store as link pointer in current block.
F468 INC HL
F469 LD (HL),D
F46A DJNZ LinkListCreate_Next
...
F46C EX DE,HL Terminate link pointer for last block.
F46D XOR A
F46E LD (HL),A
F46F INC HL
F470 LD (HL),A
F471 RET
Prev: F429 Up: Map Next: F472