You must add extra space to the local heap. This space is required to support the edit control, which uses memory from the local heap to store its current text. Make the following change to the module-definition file:
HEAPSIZE 0x4000
This statement allocates an initial heap size of 16K, which is more than enough for most edit-control operations. If the edit-control buffer needs to become larger, the local heap will increase up to 64K minus the STACKSIZE setting. Because locally declared variables are also stored on the heap, files cannot be opened that are larger than 64K minus the STACKSIZE setting minus the storage for locally declared variables.