Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!rdclark From: rdclark@Apple.COM (Richard Clark) Newsgroups: comp.sys.mac.programmer Subject: Re: A-Trap length Message-ID: <40137@apple.Apple.COM> Date: 8 Apr 90 23:27:33 GMT References: <1645.2610e886@vaxa.uwa.oz> <4598@daffy.cs.wisc.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 24 In article <4598@daffy.cs.wisc.edu> upl@gumby.cs.wisc.edu (Undergrad Projects Lab) writes: :I'm writing a little program for myself and I need to copy some of the ROM :traps to RAM. Don't try it. Assuming that you get the "correct" length (BTW -- the traps in ROM are not necesarily sorted according to their trap numbers), you still have to deal with the following questions: 1) Did I actually get the trap, or somebody's patch to it?, and 2) What do I do about the PC-relative jumps encoded in the trap codes themselves? (Surprise! There are some utility routines in ROM which get called directly.) If you can describe *why* you want to get the code out of ROM, we all can probably find a better way to do what you want. ...Richard -- -----------------------------+----------------------------------------------- Richard Clark | "If you don't know where you're going, Instructor/Designer | don't go there" -- Sybalski's Law Apple Developer University +----------------------------------------------- AppleLink, GEnie, Delphi, MCI, Internet: rdclark CI$: 71401, 2071