Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!inria!rouaix From: rouaix@inria.UUCP (Francois Rouaix) Newsgroups: comp.sys.amiga Subject: Dos library/SetFunction() question Message-ID: <455@inria.UUCP> Date: Thu, 7-May-87 08:21:51 EDT Article-I.D.: inria.455 Posted: Thu May 7 08:21:51 1987 Date-Received: Sat, 9-May-87 09:45:37 EDT Organization: INRIA, Rocquencourt. France Lines: 26 I would like to change some functions in dos.library, adding new features to CurrentDir() for example. The best way to do this on a library is: - write a piece of code that does what you want, and then call the old function. - SetFunction() to your new code, getting the old pointer. The problem is: for most libraries, the 'vector table' looks like: JMP address1 JMP address2 .... LibBase {some code} I believe the SetFunction() is returning {address1}. BUT: for dos.library the vector table looks like: MOVEQ #x,d0 BRA entry_point (repeated) where the code at entry_point is doing some standard stack manipulations, and then computes some address from x and goes to it. (BTW this reminds me of ProDOS) My question is: how can you use SetFunction on dos.library ?? -------------------------------------------------------------