Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Block allocation (more than one page or 256 bytes) is implemented since OZ 4.7. Up to one bank can be requested (16384 bytes).

If such a block is requested (more than 256 bytes), MM_MUL has to be specified in OS_Mop.

Remember If MM_MUL has not been specified, a "No Room" error means the pool is exhausted, and not the whole of memory. If a subsequent OS_Mop cannot allocate a pool, then memory is definitively exhausted.

The call WILL NOT automatically bind in the allocated memory into the Z80 address space.

Address of memory allocated (HL) is always adjusted to segment mask.

Normally memory is allocated from slots 1-2-3-0 in that order.

...

If MM_MUL is specified in OS_Mop, slot 1-3 can be forced during first OS_Mal by loading A with slot number ORed with MA_SLT.

Related calls

OS_Bix, Bind in extended address
OS_Box, restore bindings after OS_Bix
OS_Fc, select fast code (fast bank switching)
OS_Mcl, close memory (free memory pool)
OS_Mfr, free (previously allocated block) memory
OS_Mgb, get current bank binding in segment
OS_Mop, open memory (allocate memory pool)
OS_Mpb, set new bank binding in segment
OZ_Mgb, get current bank binding in segment
OZ_Mpb, set new bank binding in segment