<< Previous | Next >>

pxnext_fast

xmem long pxnext_fast( Pool_t * p, long e );

Description

Get the next allocated element in an xmem pool. The pool MUST be set to being a linked pool using pool_link(p, <non-zero>); otherwise, the results are undefined.

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

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

Registers

Parameters in IX, DE respectively
Trashes AF, HL
Return value in BCDE, carry flag

Example

ld ix,my_pool
ld de,(current_element)
ld bc,(current_element+2)
lcall pxnext_fast
jr c,.no_more_elems
; BCDE points to next allocated element

Parameters

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

e
Current element, address in BCDE register. See pxnext() for fuller description.

Return value

C flag set: There are no more elements
C flag clear (NC): BCDE points to next element

Library

POOL.LIB

See Also

pool_xinit, pool_link, pxalloc, pxfree, pxfirst, pxprev


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