Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!cernvax!ethz!claudio From: claudio@ethz.UUCP (Claudio Nieder) Newsgroups: net.micro.amiga Subject: Some remarks to AmigaDos. Message-ID: <392@ethz.UUCP> Date: Tue, 21-Oct-86 16:58:59 EDT Article-I.D.: ethz.392 Posted: Tue Oct 21 16:58:59 1986 Date-Received: Thu, 23-Oct-86 23:02:58 EDT Reply-To: claudio@ethz.UUCP (Claudio Nieder) Organization: CS Department, ETH Zuerich, Switzerland Lines: 52 [E t th s ne i ou ca . ] We already had some discussions about AmigaDos. Here some new comments, but this time NOT about the filesystem. We tried to write a program dosspy which should monitor some AmigaDos calls. We first used SetFunction to change the library pointer to our routines and to get the address of the original routines. This didn't work because SetFunction assumes that the code vectors are JMP abs.L and returns you the last 4 byte of the 6 byte entry. AmigaDos has another entry: MOVEQ.L #byte,D0 BRA libStart+$4E A function dispatcher at libStart+4E will call the desired function according to the value of byte. After mastering this problem we tried our dosspy with some programs and several dos commands. It worked with programs, but displayed nothing with dos commands. It seems that commands (as rename) doesn't call dos.library through the library vectors. To find out more we disassembled rename. Here the first 3 instructions of rename: MOVEA.L $164(A2),A4 MOVEQ.L $C,D0 JSR (A5) Seems that a program starts not only with A0 pointing to the arguments and D0 indicating the number of the characters in the argument. At least A2 and A5 are initialised with some magic values pointing probably to the function dispatcher (A5) and to some global values (A2) of AmigaDos. So if anybody ever had the idea to exchange the AmigaDos function by own functions (e.g. try to implement a second filesystem which would coexist with the present one and be transparent to the user) he will have to rewrite all dos functions ! -- claudio (* --------------------------------------------------------------------- Disclaimer: I'm not working for ETH-Zurich! I'm just a CS student. E-Mail: UUCP: claudio@ethz.uucp BITNET: K538912@CZHRZU1A Mail: Claudio Nieder, Kanalweg 1, CH-8610 Uster, Switzerland. --------------------------------------------------------------------- *)