On 8/25/2022 4:44 AM, Carsten Strotmann wrote:
Hi,
On 25 Aug 2022, at 9:41, Paul Dufresne via Freedos-devel wrote:
While thinking about 64k limit for edit... I come to think about 16 bits and 32
bits programs...
the 64kb limit is an artificial limit in the source code of the "edit" tool:
https://gitlab.com/FreeDOS/base/edit-freedos/-/blob/master/SOURCE/EDIT/EDIT.C
/* check file size */
if (sb.st_size > 64000UL)
{
ermsg = DFmalloc(strlen(FileName)+100); /* alloc fixed 0.7a */
strcpy(ermsg, "File too large for this version of Edit:\n");
strcat(ermsg, FileName);
ErrorMessage(ermsg);
free(ermsg);
return;
}
The program "edit.exe" is compiled in the "large" memory model, it *should* be
able to use the whole available DOS memory, at least more than 64kb.
Maybe it's time to remove that limit from the tool.
That is likely not that easy. Even in the LARGE memory module, single
objects are likely limited to 64KB (minus some overhead), so it isn't as
easy as just removing what you call "artificial limit"...
Ralf
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel