<< Previous | Next >>

pfirst_fast

xmem void * pfirst_fast( Pool_t * p );

Description

Get the first allocated element in a root pool. The pool MUST be set to being a linked pool by using:

   

pool_link(p, <non-zero>);

Otherwise the results are undefined.

This is an assembler-only version of pfirst().

*** Do _not_ call this function from C. ***

Registers

Parameter in IX
Trashes F, DE
Return value in HL, carry flag

Example

   

ld ix,my_pool
lcall pfirst_fast
jr c,.no_elems
; HL points to first element

Parameters

p
Pool handle structure, as previously passed to pool_init(). Pass this in the IX register.

Return value

C flag set, HL=0: There are no allocated elements.
C flag clear (NC): HL points to first element.

Library

POOL.LIB

See Also

pool_init, pool_link, pfirst, pnext_fast


Dynamic C Functions << Previous | Next >> rabbit.com