[comp.sys.apple] LinkIIGS

nicholaA@batman.moravian.EDU (Andy Nicholas) (03/13/90)

If you program in assembly and you use LinkIIGS to link your code together,
you should be aware of a minor problem that LinkIIGS exhibits when used in
combination with APW or Orca.  If a local branch (BCS, BNE, BCC, BEQ, etc)
is out of range (ie, >128 byte away) and the branch is to a START, PRIVATE,
or ENTRY label in APW or Orca, LinkIIGS resolves the branch anyway and doesn't
report the fact that the local branch is out of range.   This can lead to
some really strange behavior in certain programs.  If you need confirmation
that this may be happening in one of your programs, link your program together
with the old Linker 1.1 or apw's linker.  The older linkers will find the
branch's out-of-range error and report it properly...

The following code demonstrates the problem:

main   start
       sec
       bcs    naughty

       ds     200
       end

naughty start
       nop
       end

This code assembles properly and also appears to link properly under LinkIIGS,
but the BCS operand isn't correct and you end up branching backwards instead
of forwards. 

andy

-- 

Yeah!