For TSR's, there are additional things you can do to reduce memory.  You can 
look at the source code for my PRTSCR program (available at 
http://bretjohnson.us) that uses a BUNCH of tricks.  For example, it doesn't 
even use the DOS TSR interrupt.

The way it works is to make a "copy" of itself at the top of conventional 
memory, terminates itself (using a normal DOS terminate process, which includes 
deleting the original PSP), and then continues running from the "copy".  The 
"copy" decides where the best place in memory is to load the TSR (which can 
even be in one or more "memory holes" left by some other program or in upper 
memory), allocates appropriate memory block(s), and then installs itself in the 
allocated memory.  I learned that technique from ECM a long time ago.  It's 
much more complicated than a "normal" TSR installation, but is much more 
efficient in terms of ultimate memory use.

PRTSCR also includes the ability for the TSR to allocate memory blocks in 
Expanded Memory (EMS) or Extended Memory (EMS, though this happens indirectly 
through the use of DOS Protected Mode Services or DPMS).  Using these 
techniques, you can actually have a complicated TSR that requires LOTS of data 
but only a small part of the data (and code) requires the use of conventional 
(or even upper) memory.

I'm still experimenting with the EMS & DPMS things so don't think that part is 
necessarily "good to go", but it is something you can experiment with if you 
want.  I'm also converting the code from A86 to NASM, and the code on the web 
site is in A86 (actually, A386) format so you would need modify it to work with 
some other assembler.


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to