Path: utzoo!mnetor!uunet!husc6!m2c!applix!scott From: scott@applix.UUCP (Scott Evernden) Newsgroups: comp.sys.amiga Subject: Re: LVOs and SetFunction Message-ID: <677@applix.UUCP> Date: 20 Mar 88 02:32:26 GMT References: <8803060000.AA29981@cory.Berkeley.EDU> <661@applix.UUCP> <1581@sugar.UUCP> Reply-To: scott@applix.UUCP (Scott Evernden) Organization: APPLiX Inc., Westboro MA Lines: 39 In article <1581@sugar.UUCP> schaub@sugar.UUCP (Markus Schaub) writes: >In article <661@applix.UUCP>, scott@applix.UUCP (Scott Evernden) writes: >> >> VOID myScrollRaster(); >> >> oldScrollRaster = SetFunction(GfxBase, (long) lvoScrollRaster, >> myScrollRaster); >> -scott > >How do you access the parameters of ScrollRaster? My magic book tells me >that there are 7 parameters available in 7 registers. This SetFunction() call allows me to *intercept* calls to ScrollRaster(). The parameters are in the registers they're supposed to be in. Perhaps I don't follow the question? Here's an sketch of some code continuing the example above (again, for Manx C): #asm public _geta4 public _myScrollRaster _myScrollRaster: ; 'scuse me move.l a4,-(sp) jsr _geta4 ; establish addressing tst.l do_i_need_to_intercept_scroll_raster beq.s 1$ movem.l a1/d0-d5,-(sp) ; save args passed to ScrollRaster() jsr _do_my_scroll_raster_thing ; perhaps accessing parms movem.l (sp)+,a1/d0-d5 ; restore passed parameters 1$: movea.l _oldScrollRaster,a0 ; the real vector movea.l (sp)+,a4 ; a4 as it was jmp (a0) ; go do the real thing #endasm -scott