🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm.x86
Article #87

Re: DOSSEG and TLINK

#87
From: assassin17
Date: Sat, 22 May 1999 00:00
52 lines
3288 bytes
  Anthony Williams <anthony_w@geocities.com> wrote:
> I am just adding DOSSEG support to ALINK, and I am a bit concerned
> about the use of Rule 1 to place XAAA and DARK at the beginning of the
> file, even though they are part of DGROUP. If someone has placed their
> code segment into DGROUP, presumably it's for a reason, e.g. so that
> all the code and data can be accessed with the same segment register,
> which is then messed up if it is placed outside DGROUP because it is a
> code segment.
>
> I am inclined to treat XAAA and DARK under rule 3b.
>
> Any comments?

i tend to agree with your thoughts because they give the programmer more
control as to where the segments go.  however, bob smith mentioned
earlier in the thread that the order below is the standard.  plus, it is
how MS Link does things -- and i think M$ invented DOSSEG in the first
place.  but it looks like there could be some freedom.  here's a chunk
from the Watcom Linker documentation:

-----
When the DOSSEG option is specified, segments are ordered in the
following way:

1.all segments not belonging to group DGROUP with class CODE
2.all other segments not belonging to group DGROUP
3.all segments belonging to group DGROUP with class BEGDATA
4.all segments belonging to group DGROUP not with class BEGDATA, BSS or
STACK
5.all segments belonging to group DGROUP with class BSS
6.all segments belonging to group DGROUP with class STACK
-----

so watcom appears to handle it the way you're leaning towards.  but i
can't verify this because i can't find the linker..  damn, i don't even
know where watcom's *website* is. :P

-assassin17@rocketmail.com

=-= Join us in the fight against violence! =-=

> 1. All segments with a class name ending in CODE
> 2. Far data segments (segments outside DGROUP)
> 3. Near data (DGROUP) segments, in the following order:
 >       a. Segments of class BEGDATA (reserved for Microsoft use)
 >       b. Any segments not of class BEGDATA, BSS, or STACK
 >       c. Segments of class BSS
 >       d. Segments of class STACK


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
Technical Details
Message-ID: <7i66ti$por$4@autumn.news.rcn.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7hg7kq$ksb$1@autumn.news.rcn.net> <7hih7k$8vb$2@autumn.news.rcn.net> <7hnajq$jfn$1@autumn.news.rcn.net> <7hnfm3$i3u$1@autumn.news.rcn.net> <7i4r7g$ol7$1@autumn.news.rcn.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: feaef,dda8022d1c19bc63
X-Google-Attributes: gidfeaef,public
X-Google-Thread: f7d8d,dda8022d1c19bc63
X-Google-Attributes: gidf7d8d,public
X-Google-Thread: 114917,dda8022d1c19bc63
X-Google-Attributes: gid114917,public
From: assassin17@rocketmail.com
Subject: Re: DOSSEG and TLINK
Date: 1999/05/22
Message-ID: <7i66ti$por$4@autumn.news.rcn.net>
X-Deja-AN: 480858418
Approved: <johnfine@erols.com>
References: <7hg7kq$ksb$1@autumn.news.rcn.net> <7hih7k$8vb$2@autumn.news.rcn.net> <7hnajq$jfn$1@autumn.news.rcn.net> <7hnfm3$i3u$1@autumn.news.rcn.net> <7i4r7g$ol7$1@autumn.news.rcn.net>
X-Http-User-Agent: Mozilla/4.08 [en] (Win95; I)
X-Complaints-To: abuse@rcn.com
X-Trace: NlIiueOnr9RZiCgLmsnQtgIxgsB3n983rNig01yfRRQ=
X-Http-Proxy: 1.0 x25.deja.com:80 (Squid/1.1.22) for client 206.68.208.233
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Sat May 22 05:45:53 1999 GMT
NNTP-Posting-Date: 22 May 1999 12:11:30 GMT
Newsgroups: comp.lang.asm.x86,borland.public.tasm,alt.lang.asm