[comp.sys.mac.system] 32K limits

tim@hoptoad.uucp (Tim Maroney) (05/02/90)

In article <533@cartan.math.nd.edu> milo@cartan.math.nd.edu (Greg Corson)
writes:
>They may have fixed the problem in the resource manager...but every development
>system I've seen still forces you into the 32k segment limits.
>
>I haven't checked MPW 3.0...the MPW linker has has switches for creating larger
>segments for some time...but as of 2.0.2 they didn't work...maby 3.0 or 3.1
>they do.

They do now, and they did in 2.0.2 as well -- I used them routinely.
If you were getting error messages, it was because you didn't realize
that you had to arrange your code carefully so that no relative branch
had to go more than 32K.  Granted, it would be nice if the linker could
do this for you, or even insert instructions to compute larger relative
jumps, but both problems are fairly complex -- the latter one so much
so that it turns the linker into something more like a peephole
optimizer.  Rearranging code inside functions is not something a linker
ought to be doing.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Now hear a plain fact: Swedenborg has not written one new truth: Now hear
  another: he has written all the old falshoods.
 And now hear the reason.  He conversed with Angels who are all religious, &
  conversed not with Devils who all hate religion..."
    - Blake, "The Marriage of Heaven and Hell"

tim@hoptoad.uucp (Tim Maroney) (05/02/90)

In article <11288@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>do this for you, or even insert instructions to compute larger relative
>jumps, but both problems are fairly complex -- the latter one so much
>so that it turns the linker into something more like a peephole
>optimizer.  Rearranging code inside functions is not something a linker
>ought to be doing.

Actually, though, given five seconds more thought, it *could* insert
stub routines which lie within 32K of the calling code, and which
compute the true routine addresses and jump to them without perturbing
registers or condition codes, without rearranging code inside the
"offending" routines.  Hmm.  Maybe in 5.0....
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"When errors are found in old research, the relevant theories are
 re-examined.  When facts contradict theory, theory gets dumped.  Is
 that why the NLP people are unwilling to research their facts?"
	-- Jerry Hollombe on sci.psychology