On Sun, 18 Apr 1999, Mark Nudelman wrote:
> The trick listed on that web page works fine. One additional idea that
> may be useful: the web page says "Of course you must ensure (by
> shuffling your functions and objects) that calls between your functions
> don't exceed the 32k branch limit." If it's more convenient, you can
> use the trick often called "jump islands" to avoid tedious reshuffling
> of objects and code within the objects.
[Mark goes on to describe manually generated jump islands]
> That's two jumps, so it's a tiny bit slower, but now you can reach
> (almost) from one end of the 64K segment to the other, since the jump
> island in the middle gives you a "stepping stone"; each branch will be
> less than 32K. This will start to break down as you get near the 64K
> limit, but in my experience it works pretty well for apps between 32K
> and around 50-60K.
Actually, this technique can be applied to any size code, and doesn't need
to be inefficient. You can jave more then one jump island targetting a
particular function, "chaining" the islands if necessary to bridge a gap
larger then 32K. The inefficiency of a double-jump can be reduced by only
invoking the island call if the jump is actually too long.
There's no reason this can't be applied to any size of code, although
there is still the 64K resource length limit. And, of course, these sorts
of jump islands aren't fun to keep track of manually.
--
Kenneth Albanowski ([EMAIL PROTECTED], CIS: 70705,126)