Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!math.fu-berlin.de!opal!ki From: ki@opal.cs.tu-berlin.de (Karsten Isakovic) Newsgroups: comp.sys.atari.st.tech Subject: Re: How to use the VDI from the Autofolder Message-ID: <3491@quepasa.cs.tu-berlin.de> Date: 26 May 91 19:09:45 GMT References: <1991May24.184249.21414@imada.ou.dk> <1991May25.152208.2925@actrix.gen.nz> Organization: Technical University of Berlin, Germany Lines: 33 In article <1991May25.152208.2925@actrix.gen.nz> Roger.Sheppard@actrix.gen.nz (Roger Sheppard) writes: >This came from a File that I found some time back on Genie, it could >be of help to otheres, with the Trap #2 problems. > > btst #5,(sp) ; Super or user mode? > beq.s t13_ex ; If user mode, let's forget the whole thing > cmp.l #$050101,6(sp) ; Setexec call for critical error vector? The code does not use the XBRA method, which _is_ standard... > first_time: > tst.l 10(sp) ; Reading the vector? > bmi.s t13_ex ; Yes, let the system take care of it > cmp.l #$FC0000,10(sp) ; Is this address below the ROMs? > blo.s t13_ex ; Yes, bail out And it does not work with RAM-TOS versions, or even with the new STE or TT machines... (Please use the os_start entry in the _sysbase structure pointed to by the system variable $4f2.) > A better method than the magic hockey puck is to issue an OS call with an >undefined function number, like BIOS #73, or AES #1200, and have your program >return a pre-defined value somehow, indicating that it's installed. This method is not good. The 'unused' function call might be used in a future TOS version. You simply have to install a Cookie interface for the TSR. The value of the cookie points to an internal TSR structure, so that a DA, CPX or PRG can configure the TSR. Sincerly, Karsten (ki@opal.cs.tu-berlin.de)