2 ; Ullrich von Bassewitz, 2003-02-01
4 ; Return the amount of free memory on the heap.
6 ; size_t _heapmemavail (void);
11 .export __heapmemavail
17 ;-----------------------------------------------------------------------------
28 ; struct freeblock* F = _heapfirst;
38 beq @L2 ; Jump if end of free list reached
53 iny ; Points to F->next
61 ; return Size + (_heapend - _heapptr) * sizeof (*_heapend);