Jump to content

Shrink TSR usage by using PSP space


Recommended Posts

I noticed that PSP bytes 80-FF are used for the command-line of DOS programs.

So I use MOV WORD PTR [80h],0D00h to safely blow away the command line. (Some memory analysis tools try to show arguments of loaded TSR's, so I do not want to corrupt PSP too badly). Then in the transient part of the TSR, I can copy the resident part of my code to 0x82 and on. Using this trick I can decrease memory usage of loaded TSR by 0x7E bytes.

For example, one of the PC Magazine TSR's I like, QUICKEYS.COM, uses 464 bytes + environment normally, but I've optimized it down to 320 bytes.

Surely there are more ways to exploit storage in the PSP. Anyone know any good info on this?

Also, is there anyway to get rid of the PSP completely? It seems like a big waste of space.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...