TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: All
from: Paul Edwards
date: 1996-01-03 23:38:10
subject: asm + link problems

Does anyone have any ideas on the following problem?  I have
asked before, but not got an answer that explained the problem.
Please note that two.asm is actually generated code (generated
by Borland C) so I have no control over it.  If the generated
code is buggy (ie a bug in Borland C), then I would like to
know that.  However, the fact that tlink makes it work, suggests
to me that Borland C isn't buggy.

I think I will be a much better person if I can understand the
reason for the following.  Could someone please take a look at
it, as it is very small code.

It seems to me that the link386 is failing to add 0x20000 to the
offset of "ggg".  I believe that an assembler can generate
object code with references to data that should have the "load
address" in memory added to them, when the linker has figured
out where it's going to store everything.  It seems that link386 
does not fix up ggg's access.

BTW, this is actually something to do with PDPCLIB.


Here is the original problem description...



The following files demonstrate a problem with using tasm
and link386 in combination.

If you do the following:

tasm -oi -ml one.asm
tasm -oi -ml two.asm
link386 /w /pm:vio one+two,,,os2386.lib,nul.def

and then run one.exe, it gets a trap 5
If you replace the link386 with
tlink one+two,,,os2386.lib
it works.

Of if you replace the link386 with
wlink FILE one.obj,two.obj NAME one.exe LIBRARY os2386.lib 
and the "tasm -oi -ml" with "wasm"
it also works.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.