Article View: alt.lang.asm
Article #217Re: .COM files or .EXE?
From: Richard Kanarek
Date: Mon, 18 May 1998 00:00
Date: Mon, 18 May 1998 00:00
45 lines
3369 bytes
3369 bytes
Greetings. Regarding... Will DeWitt wrote: > COM files are usually faster and smaller, but are limited to 64k total for > code, data and stack space. EXE files are multi-segmented, and calls to > routines in other segments generate larger code (since passing the seg:ofs > is required, unlike a COM, which goes directly to the offset). > Will As I recall-- and please don't hesitate to correct me if I'm mistaken: a. Programs stored in .COM file format are perfectly welcome to have more than 64k of code, data, & stack space; it just needs to be allocated dynamically. That is, you can have a disk buffer, for example, of several hundred kilobytes as long as you allocated it at run time rather than reading it from the pgrm file (which you'd be unlikely to do anyway). Similarly, if you wanted to load an additional overlay or overlay like file at run time-- you'd be most welcome to do so too. b. Regarding "EXE files are multi-segmented and calls to routines in other segments generate larger code..." I think your debating the relative merits & costs of far code vs. near code memory models. While it would be unlikely for a program in a .COM file format to use far code, it isn't impossible. The suggestion, however, that .EXE pgrms use far code exclusively or even predominately seems quite unjustified. Regarding the original question: "Could anyone tell my why you would want to use a com file over an exe file or vise versa? What are advantages and disadvantages of either one?" I think the answer it that .COM programs simply lend themselves to "tiny" programs if for no other reason than that they are programed in a memory model called "tiny" and they are smaller than there similar .EXE counterparts by virtue of not having the .EXE header. Do note that for applications programs, the difference was probably largely insignificant even in the XT days (which, for me was just yesterday as my "main" computer is a Turbo XT (H/Z-158)<g>). Cordially, Richard Kanarek P.S. Note to the original poster: Didn't you go rather wild cross-posting your original post?
Technical Details
Message-ID:
<6jpdfo$gje$1@winter.news.erols.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6jkt97$oa0$1@winter.news.erols.com> <6jmp9m$gta$1@winter.news.erols.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 168199,4f646b460e2d6ee7 X-Google-Attributes: gid168199,public X-Google-Thread: 132a73,4f646b460e2d6ee7 X-Google-Attributes: gid132a73,public X-Google-Thread: 114917,4f646b460e2d6ee7 X-Google-Attributes: gid114917,public X-Google-Thread: fcdcb,4f646b460e2d6ee7 X-Google-Attributes: gidfcdcb,public X-Google-Thread: f7d8d,4f646b460e2d6ee7 X-Google-Attributes: gidf7d8d,public X-Google-Thread: f8131,4f646b460e2d6ee7 X-Google-Attributes: gidf8131,public From: Richard Kanarek <RKanarek@Sprintmail.com> Subject: Re: .COM files or .EXE? Date: 1998/05/18 Message-ID: <6jpdfo$gje$1@winter.news.erols.com> X-Deja-AN: 354291855 Content-Transfer-Encoding: 7bit Approved: <johnfine@erols.com> References: <6jkt97$oa0$1@winter.news.erols.com> <6jmp9m$gta$1@winter.news.erols.com> Content-Type: text/plain; charset=us-ascii X-Mozilla-Status: 0801 X-Complaints-To: abuse@erols.com X-UIDL: 0f745c5353 X-Trace: winter.news.erols.com 895498552 17006 207.172.240.239 (18 May 1998 13:35:52 GMT) Organization: none Mime-Version: 1.0 Reply-To: RKanarek@Sprintmail.com Newsgroups: alt.lang.asm,bit.listserv.asm370,comp.lang.asm.x86,comp.lang.asm370,fido7.talks-asm,rno.org.asm