The LazyBoy Library Manual - MemNew

Part of the Memory Management group.

%imacro MemNew 2
Prefers: ES:DI, DX:AX
Prefers: ES:DI, AX

Allocate memory in the HEAP.

If there is not a free block large enough, the memory allocation error handler will be called. By default, this will terminate the program. However, that behavior can be modified through the MemError macro.

Memory is always allocated aligned to a segment and offset of the returned pointer is always zero.

Example:

    MemNew ES:DI, DX:AX
    MemNew ES:DI, AX

See also: MemAvail, MemFree and MemError.