Path: utzoo!attcan!uunet!pilchuck!dataio!fnx!del From: del@fnx.UUCP (Dag Erik Lindberg) Newsgroups: comp.os.msdos.programmer Subject: Re: .com and .exe files Message-ID: <773@fnx.UUCP> Date: 14 Nov 90 22:24:58 GMT References: <6919@hub.ucsb.edu> <4725@trantor.harris-atd.com> <27016@cs.yale.edu> <772@fnx.UUCP> Reply-To: del@fnx.UUCP (Dag Erik Lindberg) Distribution: alt Organization: I/Ovations Kirkland, WA Lines: 120 In article <27016@cs.yale.edu> buddington-paul@cs.yale.edu (Paul Buddington) writes: >convert it to a .COM file and run it. (The reverse is also true - you cannot >run the .EXE file from which you generate a .COM file either.) The problem I just posted a contradiction of this in another newsgroup, isn't that a coincidence? Fact is, if the EXE file is produced correctly, it will run as either an EXE or as a COM. Zortech C, for example, generates programs up to 64k which will run as either EXE or can be converted to COM and run in that format. See the end of this article for a small example generated by Zortech C. >addition, multi-segmented files can only be in the .EXE format. This is also not strictly true. It is true that you cannot have a stack segment, but a data segment can be used, if you are tricky, allowing your program to have 64k program and 64k combined stack/data. Here is an EXE file that runs, and can also be converted to COM. You will just have to trust me when I say that larger, more complex programs also work fine in either mode. begin 664 hello.exe M35I$ D " ( __\ 0 ' M M M M M M ZP&0^KAZ#04/ +D$ -/HC,D#P8[8C 9: 2:+ M'BP B1Y' 8O8*QY: 8D>K0 FBQX" "O8@?L $'(#N_\/B] #TT*Q!-/CCM"+ MXX'KP@* _P)S!KK" .G> ?NT,,TAHUP!/ )S!KKU .G, 08?%@>^@ #\K#+D MB\B_P@+SI#+ JHS0CMA'@^?^B3ZE ,<%JE6^P@*[ @"L/#UU"H,^; $ = /H M+P$*P'0_NB )/"!TYCP)=.(\(G0$/"=U!8K0BO!&@_M =@:Z$ 'I:P%.B;=A M (/# JP*P'0/.L)T!#K&=?,RP(A$_^NNT>N)'F$!QP9C 6$ BQYL 0O;=0.[ M ""!^P "YP@*_I (KS^,$,L#SJC/M MZ,8 _S9C ?\V80'HL0!0Z&P Z%@#@#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