OS_Mfr, Free (previously allocated block) memory

Register parameters

RST 20H, DEFB $57
IN:
     IX = memory pool handle (returned from OS_Mop)
     BC = size of memory to release
     AHL = extended pointer address to beginning of memory block (A = bank)

OUT, if call successful:
     Fc = 0
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_HAND ($08), bad handle
          RC_BAD ($04), invalid AHL/BC/IX combination
          RC_ERR ($0F), internal error (fatal)

Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different 

Notes

RC_BAD may occur if the IX is the handle for another pool, or if A does not match pool bank number, or HL is not allocated in that pool.

Bugs

Z88 crashes with a blinking "FAIL" message if you try to free memory that was already released with a previous OS_Mfr.

Unrecoverable error returns a RC_ERR fatal error since OZ 4.6

Related calls

OS_Bix, Bind in extended address
OS_Box, restore bindings after OS_Bix
OS_Fc, select fast code (fast bank switching)
OS_Mal, allocate memory
OS_Mcl, close memory (free memory pool)
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