Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!zaphod.mps.ohio-state.edu!gem.mps.ohio-state.edu!swrinde!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!swh From: swh@hpcupt1.HP.COM (Steve Harrold) Newsgroups: comp.sys.ibm.pc Subject: Re: HELP! Using DOS print Message-ID: <-286529971@hpcupt1.HP.COM> Date: 29 Nov 89 16:15:20 GMT References: <6534@brspyr1.BRS.Com> Organization: Hewlett Packard, Cupertino Lines: 19 Re: Using PRINT from within a program I haven't tried your particular program setup, but I suspect you may be overlooking the fact that, although PRINT is not a TSR in the usual sense, it does grab memory for its buffers and some code, and never ever again lets go of it. This is necessary because PRINT operates in the background while you do additional work. When control comes back from PRINT, it has not yet completed its operation. Since the memory is not freed, you end up with fragmented memory; DOS does not handle this well, satisfying all of subsequent memory requests from only one free memory hole. The only thing you can do to get around this is to start PRINT once BEFORE to run your program. In this way, the PRINT memory is assigned at the top of memory (or is it at the bottom? At any rate, memory fragmentation is avoided). A good place to do this is in your AUTOEXEC.BAT file. Hope this helps.