04h AL$SHNK shrink an allocator cell
Input D register - Number of bytes to shrink the cell by.
X register - Tag of the cell to be shrunk.
UTW_S0 - Offset in cell to start shrink.
Output - none -
Description

Decrease the cell whose base address is held in the two byte address pointed at by the X register by the number of bytes in the D register.

The gap is closed at UTW_S0 bytes from the start of the cell.

The base of the cell will not move as the extra space is deleted after the start of the cell. However all cells which come after this cell will be moved to take up the extra space.

If the value of X is not in the correct range ($2000-$203E) results will be unpredictable and potentially catastrophic. If the offset in UTW_S0 is bigger than the cell, the shrink will still be performed with unpredictable and potentially catastrophic results. The user may write his own shell to protect against these bugs.

Example For example, to shrink a cell whose tag is held in CELL by 6 bytes from the beginning:
        LDX     #0
        STX     UTW_S0  ; Offset for shrink
        LDX     CELL    ; get the tag
        LDD     #6      ; amount to shrink cell
        OS      AL$SHNK
Errors - none -