Article View: comp.sys.mac
Article #16653Re: Code Segments > 32K
From: Pierce T. Wetter
Date: Sat, 06 Jun 1987 09:59
Date: Sat, 06 Jun 1987 09:59
40 lines
2234 bytes
2234 bytes
>
> Is it not true that there is no limit to CODE segments? The bug that limits
>segments to 32k is in WriteResource, so only the compiler needs to worry
>about it. Am I right on this?
> With MPW, you can say 'Link -ss 100000 foo.o -o foo' and you'll be allowed
>to have segments of up to 100,000 bytes in size. This will definitely work
>on new ROM machines, but MPW says:
>
> 64k ROM note: Caution! Applications with segments
> greater then 32k in size may not load
> correctly on Macintoshes with 64k ROMs.
>
> Will someone please make this clear? Will a 37k CODE segment work on
>an old-ROM Macintosh?
> Reid
The bug is in getResource and has to do with using a bset instead of a btst.
Consequently if you have an odd multiple of 32K the GetResource call will toast
32K of your CODE. THere was a TechNote on this with a Patch as well.
PIerce WEtter
After his Ignoble Disgrace, Satan was being expelled from
Heaven. As he passed through the Gates, he paused a moment in thought,
and turned to God and said, "A new creature called Man, I hear, is soon
to be created."
"This is true," He replied.
"He will need laws," said the Demon slyly.
"What! You, his appointed Enemy for all Time! You ask for the
right to make his laws?"
"Oh, no!" Satan replied, "I ask only that he be allowed to make
his own."
It was so granted.
-- Ambrose Bierce, "The Devil's Dictionary"
--------------------------------------------
wetter@tybalt.caltech.edu
--------------------------------------------
Technical Details
Message-ID:
<2969@cit-vax.Caltech.Edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ll-xn!cit-vax!tybalt.caltech.edu!wetterReferences:
<gUjLscy00UhTg480nL@andrew.cmu.edu> <572@unicus.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ll-xn!cit-vax!tybalt.caltech.edu!wetter From: wetter@tybalt.caltech.edu (Pierce T. Wetter) Newsgroups: comp.sys.mac Subject: Re: Code Segments > 32K Message-ID: <2969@cit-vax.Caltech.Edu> Date: Sat, 6-Jun-87 05:59:02 EDT Article-I.D.: cit-vax.2969 Posted: Sat Jun 6 05:59:02 1987 Date-Received: Wed, 10-Jun-87 03:12:31 EDT References: <gUjLscy00UhTg480nL@andrew.cmu.edu> <572@unicus.UUCP> Sender: news@cit-vax.Caltech.Edu Reply-To: wetter@tybalt.caltech.edu.UUCP (Pierce T. Wetter) Organization: Calfornia Institute of Technology Lines: 40 Keywords: mpw segment c 32k limit