Path: utzoo!utgpu!attcan!ncrcan!ziebmef!stephen From: stephen@ziebmef.uucp (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc Subject: Re: More assembly questions about TSR development. Summary: accessing more than 64K in a COM file Keywords: TSR, .EXE, .COM Message-ID: <1989May6.201652.5034@ziebmef.uucp> Date: 7 May 89 00:16:51 GMT References: <4550@tekigm2.MEN.TEK.COM> <210@opus.NMSU.EDU> Reply-To: stephen@ziebmef.UUCP (Stephen M. Dunn) Distribution: na Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 25 In article <210@opus.NMSU.EDU> pgaughan@dante.UUCP (Patrick Gaughan) writes: : Since .COM files are limited to 1 segment, this generally implies 64k is the : limit on the size of the final code (although I'm sure there is a way : around this...) Okay, you asked for it! (:-) It's easy enough to do, as there are no run-time checks made on your segment registers. First, you shrink your memory allocation down to whatever size your program really is (remembering to include the stack and, if you aren't using the full 64K, remembering also to move the stack to its new location). Then, you allocate whatever memory you want and store its segment somewhere and play around with the rest of your memory to your heart's desire. BTW, there obviously is a way to do this because COMMAND.COM does it. The .EXE loader (i.e. relocating loader) is found in COMMAND.COM, and it has to be able to load in .EXE files of any size, often >64K. Regards, Steve -- ------------------------------------------------------------------------------- ! Stephen M. Dunn stephen@ziebmef.UUCP ! DISCLAIMER: Who'd ever ! ! (I am currently pondering a witticism to go here) ! claim such dumb ideas? ! -------------------------------------------------------------------------------