*------------------------------------------------------------------------------ * NAME MEM_DEALLOC *------------------------------------------------------------------------------ * DEPENDENCY None * PURPOSE Deallocate an already allocated area of memory * DESCRIPTION Deallocate a previously allocated area of memory, the address of * which is passed in A0.L. * INPUTS : * A0.L = Address of area to deallocate * OUTPUTS : * A0.L = zero to avoid using the memory again ! * D0 = Error code * Z flag set if no errors, unset otherwise. *------------------------------------------------------------------------------ mem_dealloc movem.l d1-d3/a1-a3,-(a7) ; Save working registers moveq #MT_RECHP,d0 ; Set the trap trap #1 ; Do it movem.l (a7)+,d1-d3/a1-a3 ; Restore working registers suba.l a0,a0 ; Blank the memory address tst.l d0 ; Set flags rts