[net.micro.pc] Loading Problem - Solution

stekas@hou2g.UUCP (J.STEKAS) (12/20/83)

After receiving suggestions and performing some experiments I've
found out how to control the order in which segments are loaded.
Here are all the facts you need to get things loaded where you want.

1) The most important factor in determining where a "segment" will
   be placed by LINK is its "class".  LINK allocates memory to
   "classes" in the order in which they are encountered.

2) When LINK encounters a segment, it places it after previously
   encountered segments of the same class. If LINK hasn't seen
   the class before, the class is placed after the next most
   recently encountered class.

3) Although the manual states that segments are loaded in the order
   encountered don't assume that this order is the same as the source
   listing. X.OBJ modules generated by ASM (and probably anything else)
   begin with an ALPHABETICAL table. When LINK goes through this
   table it processes segments in alphabetical order, NOT in the
   order in which they are assembled.

So the simplest way to get two segments (in the same .ASM) file to
be loaded sequentially is to put them in the same class and give
them alphabetically sequential names.

         Thanks to the many helpful netters,
                                              Jim