|02h||AL$GROW||grow an allocator cell|
|Input||D register - Number of bytes to grow cell
X register - Tag of the cell to be grown.
UTW_S0 - Offset in cell to make space.
|Output||- none -|
Increase 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 opened UTW_S0 bytes from the start of the cell.
The base of the cell will not move as the extra space is added after the start of the cell. However all cells which come after this cell will be moved to make room for 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 grow 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 grow the cell whose tag is held in CELL by 6 bytes at
the end of the cell:
LDX CELL ; Get the tag OS AL$SIZE STD UTW_S0 ; Offset for grow LDX CELL ; Get the tag LDD #6 ; Amount to grow cell OS AL$GROW BCS ERROR ; Report error
|Errors||254 - Not enough memory for the cell to be allocated.|