Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!uw-entropy!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.sys.ibm.pc Subject: Re: More assembly questions about TSR development. Keywords: TSR, .EXE, .COM Message-ID: <1978@dataio.Data-IO.COM> Date: 10 May 89 20:15:26 GMT References: <4550@tekigm2.MEN.TEK.COM> <210@opus.NMSU.EDU> <1989May6.201652.5034@ziebmef.uucp> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Distribution: na Organization: Data I/O Corporation; Redmond, WA Lines: 16 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...) Not true. COM files are not limited to one segment. The fact that most COM files are only one segment does not mean it has to be this way. COM files are only limited in that the size of the .COM *file* is limited to 64k minus some overhead bytes. Proof of this is that the Zortech C compiler generates .COM programs that have 2 segments (code and data). You can use multiple segments by doing the segment relocation yourself (which the EXE file loader does for you). For more info, read the MS-DOS Tech Ref manual under "DOS Program Segment".