Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!fernwood!portal!cup.portal.com!Invader From: Invader@cup.portal.com (Michael K Donegan) Newsgroups: comp.sys.mac.programmer Subject: Re: A-Trap length Message-ID: <28824@cup.portal.com> Date: 12 Apr 90 06:50:17 GMT References: <1645.2610e886@vaxa.uwa.oz> <4598@daffy.cs.wisc.edu> Organization: The Portal System (TM) Lines: 14 Copying traps from ROM to RAM? This is so fraught with danger I can't believe that you are considering it. For one thing, getting the trap address is easy, but it doesn't guarantee that it is in ROM. Many traps are patched. They begin in RAM, wander back to ROM, etc. And those patches often depend on the code being in ROM. So if the trap you are considering moving calls another trap via the A-trap (instead of just calling it) the patches that check for things like "Was I called from MoveWindow?" won't work anymore. Also many traps use PC-relative data and will flat fail if you move the code and not the data, too. Finally and most obviously, this is not like compiled code where all of one routine is together in one place. Heck no! This is ASSEMBLER and it can go anywhere. Whatever you are trying to do, there must be a better way. What ARE you doing? mkd