Re: Bind features

new topic     » goto parent     » topic index » view thread      » older message » newer message

Maybe I'm missing something, but all of the books I have say that *.COM
*always* loads at $100h.  *.EXEs are relocateable.

Originally, the point was made about loading 40mb executables in 32mb space,
it is done with demand paging.  Check out the current issue of Linux
Magazine (not Linux Journal -- NEW).  I'm sure other OS's use similar
methods.

Of course, DOS used overlays, but that is different.  An overlay would
replace a section of code.

Please point to me documentation of *.COMs not loading at $100h.


-----Original Message-----
From: Joe Otto <jotto at NETZERO.NET>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Thursday, July 01, 1999 7:09 PM
Subject: Re: Bind features


>Okay, somebody's got to step in and straighten this out.  DOS doesn't EVER
>load anything in a fixed place except for a couple of cryptic options
>available to gurus for loading device drivers, TSRs, and such.
>
>Both COM and EXE files are relocatable.  The primary difference is as
>follows:
>
>The COM file format is a relic from CP/M, which ran on the 8080 with a
>total memory space of 64KB.  Due to this fact COM files are restricted to
>64KB in size, which just happens to be the size of a single segment in the
>8086 architecture.  Because of the shortage of available memory, when CP/M
>loaded a COM file it would overwrite the operating system memory with the
>program.  Therefore CP/M had to reserve a little memory (100H bytes) for
>O/S overhead and to reload itself when the program completed.  Thus, the
>100H address referred to earlier is the *offset* into the segment wherever
>DOS chooses to load the file.  Since, in the 8086 architecture, the segment
>is shifted left 4 bits before it's used in an address calculation, a new
>segment starts every 16 bytes, and DOS can load a COM file virtually
>anywhere in conventional memory (or upper memory under certain
>circumstances).  Under DOS the usage of the reserved 100H bytes has
>changed, but it's still required since all COM files are based on a 100H
>load offset.
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu