<< Previous | Next >>

pprev_fast

xmem void * pprev_fast( Pool_t * p, void * e );

Description

Get the previous 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 pprev().

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

Registers

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

Example
   

ld ix,my_pool
ld de,(current_element)
lcall pprev_fast
jr c,.no_more_elems
; HL points to previously allocated element

Parameters

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

e
Current element, address in DE register. See pprev() for fuller description.

Return value

C flag set, HL=0: There are no more elements
C flag clear (NC): HL points to previous element

Library

POOL.LIB

See Also

pool_init, pool_link, palloc, pprev


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