Heap.asm

This file defines the library for HEAP data types and algorithms thereof.

This is an implementation of a standard minimum binary heap using a resizable VECTOR.

See Also

Authors

  • Neil G.  Dickson
Summary
Heap.asmThis file defines the library for HEAP data types and algorithms thereof.
Functions
HeapDword_addAdds a dword to a HEAP
HeapDword_removeMinRemoves the minimum from a HEAP
HeapDword_heapifyAdjusts a HEAP downward starting from the specified index

Functions

HeapDword_add

Adds a dword to a HEAP

Parameters

pHeapaddress of HEAP
valuevalue to add

Returns

  • index of value in the HEAP

HeapDword_removeMin

Removes the minimum from a HEAP

Parameters

pHeapaddress of HEAP

Returns

  • minimum value from the HEAP

HeapDword_heapify

Adjusts a HEAP downward starting from the specified index

[ebx][esi] is the current node, [ebx][esi*2][4] is the left child, and [ebx][esi*2][8] is the right child.

NOTE: This procedure modifies esi.  NOTE: This procedure is not to be called outside this file.

Not Implemented

Parameters

ebxaddress of the array for a HEAP
esirelative address into the array (i.e. in bytes)
ecxsize of the array (in bytes)
This structure is identical to a VECTOR.
This structure is the base of a resizable (or fixed-capacity) array data structure.
This file defines the library for VECTOR data types and algorithms thereof.
This file defines the library for common data types and algorithms of PwnOS.
This file defines structures and constants for the library of common data types and algorithms of PwnOS.