Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!enea!tut!santra!jmunkki
From: jmunkki@santra.HUT.FI (Juri Munkki)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Register saving conventions
Message-ID: <15374@santra.UUCP>
Date: 13 Aug 88 20:01:00 GMT
References: <664@iraun1.ira.uka.de> <1133@lzsc.ATT.COM> <15055@santra.UUCP> <6600@umn-cs.cs.umn.edu> <25556@ucbvax.BERKELEY.EDU> <20078@cornell.UUCP> <130@lloyd.camex.uucp>
Sender: jmunkki@santra.UUCP
Reply-To: jmunkki@santra.UUCP (Juri Munkki)
Organization: Helsinki University of Technology, Finland
Lines: 52
In article <130@lloyd.camex.uucp> kent@lloyd.UUCP (Kent Borg) writes:
>I can't remember why tail patches are bad (I've never patched the
>Macintosh), but I think it has to do with interference between
>multiple patches (and Apple's tail patches?).
They are bad because Apple does something very stupid in order to save
a few bytes (well maybe KB) when patching traps. Since Apple installed
patches look for the return address from a trap, using a jsr instead of
a jmp in your code fools the patch into thinking that it is called from
a normal program instead of a buggy ROM routine and the Apple patch is
never actually applied. If it fixes a bad problem, your program will
probably "cause" a crash in some cituations...if it is something less
obvious, you might get away with your code.
***** FLAME <> *****
Why is it stupid for Apple to make patches this way?
I can think of a few reasons:
1) It slows down some traps that are actually ok. Since you usually end
up patching a simple and very often called trap to fix an obscure
problem in a very complex trap, you slow down the execution of innocent
trap and the buggy trap.
2) You can't write programs that monitor and change the results from traps.
3) These patches are much harder to document and explain to new innocent system
systems programmers that arrive at Apple. The system should be kept as simple
as possible, since we already have lost the elegance and speed of the
theoretical perfect Mac ROM.
So: Keep it simple, keep it simple to document, keep it simple to understand
and don't forget that there are people out there who would never think
that something as stupid as this can be done at Apple...
**** FLAME <> *****
Ok, when will be the totally rewritten Mac system be ready? I don't think
that the future system releases are going to be any better than 6.0 until
this thing is ready. I can only hope that Apple has some good people hired
to do this thing. The original Mac team did a good job. Can anyone repeat it?
I also hope that it won't be built to be compatible with Mac OS. Launching
Mac applications should start an emulation mode. OS/2 is good in this respect.
Juri Munkki
jmunkki@santra.hut.fi
jmunkki@fingate.bitnet
P.S.
I only like newborn computers...the Mac is getting too old for me.