Re: A92: Need Help to replace interrupt vectors


[Prev][Next][Index][Thread]

Re: A92: Need Help to replace interrupt vectors




Niklas Brunlid schrieb:
>
> At 19:09 1998-02-10 +0100, you wrote:
> >
> >I tried to use the way to redirect an interrupt vector used by David
> >Ellsworth in gray4lib and suggested by him in "convert.txt" (see below),
> >but when my program terminates, it always freeze the calc.
> >By the way, the only thing my new interrupt vector do is branch to the old
> >interrupt vector.
> >
> >	move.w	#$0700,d0
> >	trap	#1
> >	move.l	$64,old_int_1
> >	bclr.b	#2,$600001
> >	move.l	#int_1,$64
> >	bset.b	#2,$600001
> >	trap	#1
>
> It freezes because your program is moved by the TIOS, but the interrupt
> still points to its old adress. You have to restore the interrupt before
> quitting the program.
> If you succeed in making a TSR, let me know.

After my exams in the next 2 or 3 weeks I'll try : idea: allocate all 
available memory, copy your tsr-routine to its end, give unused memory back 
to the system, put the handle in a safe place (in the tsr-code perhaps), 
install the tsr and quit. For deinstalling yoou can look for a cookie in memory 
(i.e. your personal signature directly before the tsr code) after which the 
original tsr address and the handle can be stored. That is the way we did it on 
our Ataris a long time ago.		A.K.

>
> Niklas Brunlid - http://www.efd.lth.se/~e96nbr
> PQF Quote follows:
>
> Probably the last man who knew how it worked had been tortured to
> death years before. Or as soon as it was installed. Killing the
> creator was a traditional method of patent protection.
>         -- (Terry Pratchett, Small Gods)
>



References: