* Well, It really bothers me when great programs don't work on
* my A500 with 3Mb of ram, External Floppy and A590 Hard Drive....
* The reason most public domain programs collapse is because the 
* keyboard interrupt is incorrectly patched. It seems some programmers
* such as Metallica/Kefrens, Mahoney & Kaktus, and many others assume 
* that the Keyboard Interrupt is the only interrupt running from 
* Autovector 2. Unfortunately, the A590 Hard Drive uses this as well
* so what they actually patch is the A590 driver software. This has the
* effect of killing the keyboard routine in the program, as you can't
* type anything in! Instead, all keyboard input continues to be diverted
* into the system keyboard buffer...
*
* So, to programmers  who use code to patch the keyboard interrupt that
* is based on ( ie Copied from ) programs like NoiseTracker, PowerFonts, 
* Kefrens IFF Converter etc, I have a message..... 
*
*           DON'T DO IT!! LET ALL AMIGA USERS USE YOUR PROGRAM AND
*                     USE THE SEGMENT OF CODE BELOW!
* 
* This code by Dean Ashton (c)1991. Written 'cos I wanted to patch the
* Kefrens IFF Converter to run with my A590 running! 
* 
* Hi to my good friend Gully (of DiskMaster fame) who tested the first
* version of this code in his `OptoEd' editor... Thanks Gully!
*
* 

FindName   EQU    -$114   

Patch_Int   MOVE.L   4.W,A6      ; Get ExecBase
   MOVE.L   $150(A6),A0   ; Point to system resource list
   LEA   Ciaa_Text(PC),A1   ; We want the ciaa.resource
   JSR   FindName(A6)   ; Find the ciaa.resource node!
   MOVE.L   D0,A0      ; D0 holds node address
   ADD.L   #$68,A0      ; Get keyboard interupt address.
   MOVE.L   A0,Old_Addr   ; Store the address we've found.
   MOVE.L   (A0),Old_Int   ; Store the Old interrupt address
   MOVE.L   #My_Int,(A0)   ; Put our Interrupt in it's place!
Fatal_Err   RTS

My_Int   RTS         ; Put your routine here!!!

Old_Addr   DC.L   0
Old_Int   DC.L   0
Ciaa_Text   DC.B    "ciaa.resource",0
   EVEN



