You need to 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 0xAFFF
This statement limits the size of the edit-control buffer to slightly less than 32,767 (32K – 1) bytes. Files larger than this cannot be opened.