[comp.sys.amiga.tech] Lattice BLINK & ALV's

cogswell@egrunix.UUCP (Dan Cogswell) (12/18/89)

I'm using Lattice C 5.02 so could someone tell me:

	(a)  What *IS* and Automatic Link Vector (ALV)?

		-and-

	(b)  If it's an error for BLINK to create them, why does my program
	     link successfully and run?  Should I be concerned?

-- 
Dan Cogswell                         | 9-Lives...      | No, 
(313)625-3234                        | Everything else | I *don't*
INET: cogswell@unix.secs.oakland.edu | is just         | understand 
UUCP: cogswell@egrunix.UUCP          | cat food.       | alt.slack!!!

MARKV@kuhub.cc.ukans.edu (MARK GOODERUM - UNIV. OF KANSAS ACS - MARKV@UKANVAX) (12/20/89)

In article <301@egrunix.UUCP>, cogswell@egrunix.UUCP (Dan Cogswell) writes:
> I'm using Lattice C 5.02 so could someone tell me:
> 
> 	(a)  What *IS* and Automatic Link Vector (ALV)?

An ALV is generated when you are referencing a function via a 16 bit
pointer that is more than 32K away from your current location in the
program.  The ALV is just a table that contains absolute JMP instruction
to the function.

> 	(b)  If it's an error for BLINK to create them, why does my program
> 	     link successfully and run?  Should I be concerned?

The error message is given just to let you know that your 16 bit relative
code is too big to be completly relative.  You might want to declare one
or two functions as far to move them out so everthing else will work, or
break up your code into smaller modules.  For instance, if you have
a function that is called inside a loop and needs to be fast it is in
your interest to know that it is getting called with an ALV which slows
it down.  

> -- 
> Dan Cogswell                         | 9-Lives...      | No, 
> (313)625-3234                        | Everything else | I *don't*
> INET: cogswell@unix.secs.oakland.edu | is just         | understand 
> UUCP: cogswell@egrunix.UUCP          | cat food.       | alt.slack!!!
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\   Merry Christmas !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  gooderum	      \ \  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: mark@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

walker@sas.UUCP (Doug Walker) (12/21/89)

In article <301@egrunix.UUCP> cogswell@unix.secs.oakland.edu (Dan Cogswell) writes:
>	(a)  What *IS* and Automatic Link Vector (ALV)?
It is desirable to use 16-bit references to jump to routines in your
code (BSR instead of JSR) since it is smaller and faster.  However, sometimes
you have more than 64k of code;  this makes it impossible to jump directly to
the code with a 16-bit offset.  BLINK is fixing up your code so it will
work anyway.  It sticks a 16-bit branch into your code which takes you to
a 32-bit jump - kind of a one-statement inline function.  Using this 
technique, you get the benefits of 16-bit offsets for 99% of your program
and you can still address more than 64k of code.

Blink is merely warning you about what it did.  You don't need to worry 
about the messages, they are merely informative.


  *****
=*|_o_o|\\=====Doug Walker, Software Distiller=======================
 *|. o.| ||
  | o  |//     "READY!   FIRE!   AIM!   (Software under development!)
  ======
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker