[comp.sys.ibm.pc] Bug in link - Not the only one !!

billp@unimuc.UUCP (03/23/87)

Using MSC 3.0 and LINK 3.1? I have come across the following problem.

Compiling using the large model without explicitly naming a DATA SEGMENT 
the compiler generates code which sets DS to the segment offset of the 
defualt data segment  _DATA. 

The corresponding assembler instructions are
		PUSH DS
		MOV AX,SEG DATA
		MOV DS,AX

However the generated data references are all relative to the start of
DGROUP, typically something like:

		MOV AX,DGROUP:mydata.


Now along comes the linker and does its job, part of which is to link
the DGROUP segments together. In doing this it finds (I guess from the 
library because it contains the library copyright string) a 'NULL' segment
of the class BEGDATA belonging to DGROUP and following the rules it
locates this segement at the start of DGROUP. The next segment in DGROUP
is DATA.

Have you guessed it? Now all the data references are wrong by a factor
equivalent to the length of BEGDATA. !!

Has anyone come across this problem and solved it (without going to
the trouble of generating .ASM files and amending them by hand) ??

Replies to ....!siesmo!mcvax!unido!unimuc!billp would be welcome.

Bill Potter
Unisoft GmbH