So a system with 48K RAM. For DOS 2.0S, are you using the default configuration, or are you adding additional drives and additional files (which affects the low memory)?
If your system only operates on XL/SE series computers, that suggests that it's actually using the 16K (well, 14K) RAM under the OS, meaning that the 400 and 800 will not work. Does your compiler use RAM under ROM?
If you want additional RAM free, look for Mr Atari's LiteDOS, a DOS 2.0 / MyDOS compatible DOS that will free up an additional 4K of RAM.