Please enable JavaScript to view this site.

A-Shell Development History

Refinement of DIMX / SBX refinement: Use of DIMX within a function or procedure, within an SBX, no longer clears the SBX cache flag. Previously, the cache flag was being cleared so as to force a reload from disk on the next XCALL to the SBX, because DIMX modifies the memory map of the RUN module, thus making it non-reusable.

There are two significant consequences to this rather obscure refinement. The first is that re-executing an SBX that is already cached in memory is much faster than loading it from disk. So for SBXs that are called frequently, and which contain DIMX statements within functions, this can be a significant speed-up.

The second is that it permits the SBX to XCALL itself, either directly or indirectly. Previously, clearing the cache flag caused the SBX to be flushed from memory on the next XCALL. But if the SBX was still executing (in a higher stack frame), clearing it from memory would have rather disastrous ramifications (although typically resulting in an illegal syntax error when returning to the higher level instance of the SBX).

Warning: using DIMX inside an SBX but outside a function/procedure remains incompatible with SBX recursion, although there is currently no way for the runtime system to detect and warn you about it.