Article View: alt.lang.asm
Article #215Re: .COM files or .EXE?
From: D. Speir
Date: Sat, 16 May 1998 00:00
Date: Sat, 16 May 1998 00:00
21 lines
2656 bytes
2656 bytes
Com files were first in the world of dos. They are becoming a thing of the past. Com files load faster than Exe files since there is no relocation for the loader to take care of. They are an exact memory image on disk. Com files must have code in them to release the rest of conventional memory or you won't be able to spawn any more programs since dos granted all of conventional ram to them. Exe files can be compiled to do this on loading. Dos looks for com files before exe files (or it did thru dos 6.2 ). If you had two files named the same name but one had a com extension and the other an exe, and you typed the filename at the prompt, the com file would run not the exe. Some people erroneously thought that if you typed the extension the exe file would run. It won't. However if I remember right you can rename an exe file to have the com extension and will run, and it will load correctly too since the loader simply reads in the relo from the header without remembering it was just passed a com file, and will load it just like an exe file. Com files are still used in real/virtual86 tsr programming. Com files or "tiny models" are sometimes referred to as kinda like Flat Models. But kinda is about it. Flat model progs have code and data seg (even though they both start at zero ), Flat win32 models have relo provisions for static data and dynamic linked code in even though it's much different than the dos or win16 loading. So a little bit of Tiny + little bit of Small + some different relo technics = Flat. end.
Technical Details
Message-ID:
<6jl0mo$bv9$1@winter.news.erols.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6jkt97$oa0$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: f8131,4f646b460e2d6ee7 X-Google-Attributes: gidf8131,public X-Google-Thread: f7d8d,4f646b460e2d6ee7 X-Google-Attributes: gidf7d8d,public X-Google-Thread: 114917,4f646b460e2d6ee7 X-Google-Attributes: gid114917,public X-Google-Thread: 132a73,4f646b460e2d6ee7 X-Google-Attributes: gid132a73,public X-Google-Thread: fcdcb,4f646b460e2d6ee7 X-Google-Attributes: gidfcdcb,public From: "D. Speir" <speir@gte.net> Subject: Re: .COM files or .EXE? Date: 1998/05/16 Message-ID: <6jl0mo$bv9$1@winter.news.erols.com> X-Deja-AN: 353881930 Approved: <johnfine@erols.com> References: <6jkt97$oa0$1@winter.news.erols.com> X-Mozilla-Status: 0801 X-Complaints-To: abuse@erols.com X-UIDL: 65fffee3ba X-Trace: winter.news.erols.com 895354392 12265 207.172.240.196 (16 May 1998 21:33:12 GMT) Organization: gte.net X-Auth: 451A89D917C1049445450412 Newsgroups: alt.lang.asm,bit.listserv.asm370,comp.lang.asm.x86,comp.lang.asm370,fido7.talks-asm,rno.org.asm