Path: utzoo!attcan!uunet!samsung!gem.mps.ohio-state.edu!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: Tail patches Message-ID: <5320@internal.Apple.COM> Date: 21 Nov 89 01:37:31 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 43 References:<5249@internal.Apple.COM> <17090@dartvax.Dartmouth.EDU> <5292@internal.Apple.COM> <1989Nov20.182741.2658@eng.umd.edu> In article <1989Nov20.182741.2658@eng.umd.edu> russotto@eng.umd.edu (Matthew T. Russotto) writes: > In article <5292@internal.Apple.COM> chewy@apple.com (Paul Snively) writes: > >In article <17090@dartvax.Dartmouth.EDU> erics@eleazar.dartmouth.edu (Eric > >Schlegel) writes: > >> On pp. 385-6 of IM, volume 2, is documented the Restart procedure. It's > >> marked Not in ROM; assembly-language programmers are advised that "you > >can > >> give the following instructions to restart the system:" > >> MOVE ROMBase,A0 > >> JMP $0A(A0) > > > >This raises an interesting point: Inside Macintosh actually does > >programmers a disservice by saying things like "assembly-language > >programmers can..." and then giving code that relies on specific ROM > >addresses (or even specific ROM offsets, like above). The CORRECT way to > >get that same effect, given that there's a routine called RESTART that is > >marked NOT IN ROM is to Link in the appropriate library (usually Runtime.o > >for MPW users) from your development system, and make the call to the > >library routine. That's what libraries are for. > So? Your application still breaks. Unless you have a dynamic linker, > of course... (was it REALLY that hard for apple to keep a JMP to the right > spot in 0A(RomBase)? ) Your application won't break as long as you link with up-to-date library code! As for "was it hard to keep the jump," I'm not a ROM engineer, so I don't really know. There were some pretty hairy changes in going from the old Macs to the II-family Macs. __________________________________________________________________________ Just because I work for Apple Computer, Inc. doesn't mean that they believe what I believe or vice-versa. __________________________________________________________________________ C++ -- The language in which only friends can access your private members. __________________________________________________________________________