Skip to Content
Amiga Assembly Library v41.21 — Motorola 68020 shared library for Commodore Amiga

FreeNode

Synopsis

FreeNode(list, node) A0 A1

C Prototype

void FreeNode(struct List *list, struct Node *node);

Description

Removes a node from a list and frees the memory it occupies. The node must have been previously added using AllocNode(). Only nodes allocated through AllocNode() should be passed to this function.

Inputs

  • list — Address of the list that contains the node.
  • node — Address of the node to remove.

Result

None.

Notes

If you only want to remove the node from the list without freeing its memory, use Remove() or the REMOVE macro for assembly programmers.

To find a node by name, use exec.library/FindName().

See Also

FreeList, FreeNodeName

exec/Remove()

Implementation

The original 68020 assembly implementation:

; (13-Jan-1995) --- FreeNode(list,node) (a0/a1) _LVOFreeNode movem.l a5-a6,-(sp) move.l a1,a5 ; A5 = struct Node * REMOVE ; exec MACROS lea -4(a5),a1 moveq #4+LN_SIZE,d0 move.l ab_ExecBase(a6),a6 jsr _LVOFreeMem(a6) movem.l (sp)+,a5-a6 rts
Last updated on