My program crashes when I try to use more than cca 1 MiB RAM! Is this a bug in FreeBASIC?
No, it’s not a bug in FreeBASIC and it’s not really DOS specific, see also Compiler FAQ. For a beginner, the easy solution is to use Shared for arrays. More advanced users could consider using memory management functions like Allocate. This is even more important in DOS, since it allows the application to run on low memory PCs (and still edit at least small texts for example), as well as to use all huge RAM if available (and edit huge texts for example).