><><><>< 4DOS.COM - SIZE ><><><><

><><><>< 4DOS.COM - SIZE ><><><><

Post by Jan Krok » Tue, 16 May 1995 04:00:00



This may seem stupid, but how can the 4DOS.COM file
contain ca.140.000 bytes? I thought 64K was the limit for
COM files...
                                                -jk

 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by erik jens » Tue, 16 May 1995 04:00:00


: This may seem stupid, but how can the 4DOS.COM file
: contain ca.140.000 bytes? I thought 64K was the limit for
: COM files...
:                                               -jk

It's really an .exe-file with a .com extension.  (The first two bytes contain
the exe header 'MZ').  I think MSDOS requires that a shell has the extension
.com (although it obviuosly doesn't has to be a real com file).

 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by John Thomps » Thu, 18 May 1995 04:00:00



> This may seem stupid, but how can the 4DOS.COM file
> contain ca.140.000 bytes? I thought 64K was the limit for
> COM files...

That's because it's not really a .com file but an .exe file. Check the
beginning of the file with a hex editor (or list /x).  The first 2 bytes
are "MZ" just like any other .exe file.  You see, DOS doesn't look at the
extension when it goes to load a file as .com or .exe; it looks at the
header.  When it sees the "MZ" it loads the file as an .exe regardless of
the extension.


 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by Jochen Scho » Fri, 19 May 1995 04:00:00


: This may seem stupid, but how can the 4DOS.COM file
: contain ca.140.000 bytes? I thought 64K was the limit for
: COM files...

It's not a COM-File, but an EXE-File with just a .COM-Suffix
I may be wrong, but I think DOS's SHELL-line only allows
calling COMs, so they simply renamed it. DOS detects the
type of file in a different way than just reading the suffix.

- Jochen

--
--------------------------------------------------------------------------

 Lehrstuhl fuer Informatik II +-------------------------------------------
 Universitaet Wuerzburg       | You are just reading a .sig-light:
 D-97074 Wuerzburg (Germany)  | It is free of fat, sugar and cholesterol!
------------------------------+-------------------------------------------
 WWW-Homepage:        http://www.informatik.uni-wuerzburg.de/staff/joscho
--------------------------------------------------------------------------

 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by Aaron D. Maras » Sat, 20 May 1995 04:00:00





> : This may seem stupid, but how can the 4DOS.COM file
> : contain ca.140.000 bytes? I thought 64K was the limit for
> : COM files...
> It's not a COM-File, but an EXE-File with just a .COM-Suffix
> I may be wrong, but I think DOS's SHELL-line only allows
> calling COMs, so they simply renamed it. DOS detects the
> type of file in a different way than just reading the suffix.

That may be true, I'm not sure, but I'm sure .COM being executed before
.EXE in the default search probably had *something* to do with it too...
 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by (beija-fl » Sun, 21 May 1995 04:00:00




>> This may seem stupid, but how can the 4DOS.COM file
>> contain ca.140.000 bytes? I thought 64K was the limit for
>> COM files...
>That's because it's not really a .com file but an .exe file. Check the
>beginning of the file with a hex editor (or list /x).  The first 2 bytes
>are "MZ" just like any other .exe file.  You see, DOS doesn't look at the
>extension when it goes to load a file as .com or .exe; it looks at the
>header.  When it sees the "MZ" it loads the file as an .exe regardless of
>the extension.


Also, if you have a copy of PKLITE; you can compress 4DOS.COM down by
circa 50% or so and it still runs ok!!
London,UK
 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by Brett Gersekows » Fri, 26 May 1995 04:00:00


: This may seem stupid, but how can the 4DOS.COM file
: contain ca.140.000 bytes? I thought 64K was the limit for
: COM files...
:                                               -jk

Well, here's my theory...

The actual executable program code DOES fit into a 64k segment, cos
that's the way COM files load, as a direct memory image of a segment.
There is substantial help information contained within 4dos.com, though,
is there not?? That can be fairly safely shoved on the end, cos what's
after the program code won't make much difference.

--
******************************************************************************
* Brett Gersekowski                  *** BAROMETER, n. - An ingenious device *


******************************************************************************

 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by Justin Hawkin » Sat, 27 May 1995 04:00:00



> This may seem stupid, but how can the 4DOS.COM file
> contain ca.140.000 bytes? I thought 64K was the limit for
> COM files...

It is the limit. It's not a real com file. There is a bit of
information in the manual, but not much. I beleive it has to be a
com file for compatibilty with command.com

        - Justin

--

               "Don't sweat it, it's only 1's and 0's"

 
 
 

><><><>< 4DOS.COM - SIZE ><><><><

Post by Alan Daws » Tue, 30 May 1995 04:00:00



B>: contain ca.140.000 bytes? I thought 64K was the limit for
B>: COM files...
B>:                                               -jk

B>Well, here's my theory...

B>The actual executable program code DOES fit into a 64k segment, cos

4DOS.COM is a pure EXE program. DOS will run an EXE or a COM no
matter what they are called. You can name them either way, as it
pleases you. DOS will determine what they are by actually "looking"
into them and will run them properly no matter what you name them (so
long as you use .COM or .EXE or hack your DOS to look for something
else).

You can tell 4DOS.COM is a pure EXE program just by looking at it --
it begins with "MZ".

There are two "good" reasons it's distributed as 4DOS.COM. One is
history -- it used to be a pure .COM program. The other is that
*because* of the name, DOS will run 4DOS.COM over 4DOS.EXE or
4DOS.BAT, assuming it finds these at the same time.

A minor consideration is that COMMAND.COM has always been a pure .COM
file although that will change under Windows 95, and it probably will
be called COMMAND.EXE.


... They laughed when I stood up to tell a joke!

 
 
 

1. <><><> DELETING VARIABLES <><><>

I have a recursive function. I have a "static" variable in this function,
because the function is called many times, and also because the value shouldn't
change after the first time set. I would like to know how to delete this
variable, after I'm finished using it. The variable is an integer (if it
matters?!?). I am programming in C++, DOS (TC++ 3.0). Also, can a local static
variable be deleted by a different function, i.e. main() ?

Rob

2. Ruleset 194, Rule 23

3. <<<*<< HOW TO DISKCOPY Without Swapping diskettes >>*>>>

4. (no subject)

5. ><><><>< 4DOS.COM - S

6. WTB: GFX card

7. <<>> COMPUTER SOFTWARE / HARDWARE <<>>

8. How to "Echo >>>><<<<" ???

9. <<>> COMPUTER SOFTWARE / HARDWARE <<>>

10. HELP>>>>Why wouldn't dos boot?<<<<HELP

11. >>> NEED MEMORY CHECKER <<<< (Checkit doesn't work!)