[comp.sys.amiga.tech] Need hints on debugging an interrupt handler, also Wack

karl@sugar.uu.net (Karl Lehenbauer) (12/15/88)

I have written a serial interrupt handler using info gleaned from the RKM,
hardware and exec manuals.  It is intended to replace the Amiga one when
using Bill Barton's MIDI library.  I have found the MIDI library (really
the Amiga serial input handler) to drop an unacceptably large number of
bits when doing heavy MIDI.  My replacement is in heavily hacked assembly.
I'm calling signal to signal a companion task when I have a complete MIDI
message.  The routine isn't making any calls to any other library routines.

In order to test in a relatively friendly environment, I constructed an 
interrupt simulator that faked the custom registers (A0 points to them on 
entry), set up the is_Data pointer in A1, put the exec library base in A6, 
etc, etc.  I tested a lot in this environment and everything seems cool.  Of 
course when I run it for real, the system hangs.

If I had an in-circuit emulator, I could debug this thing in an hour or two, 
but for the moment at least I am limited to software approaches.

I am trying to use ROMwack but its use of the serial port seems to perturb
my stuff.  I also find it a pain because it doesn't disassemble instructions
as you single step.  The manual says some stuff about another debugger,
GrandWack.  Is that real?  (I realize this may have been discussed before but
if so I wasn't paying attention.)  If so, how do I get it started up?
Is there other software on the Amiga useful for debugging interrupts?  Is 
there an equivalent at all to kprintf (kernel printf), a means in Unix by 
which one can call printf from inside a driver?  (With kprintf, printf output 
goes out polled so as not to require interrupts (and a lot of the system) to 
be working.  Usually this goes to (uh-oh) the serial port.)

Any hints, tips, etc, will be appreciated.
-- 
-- "We've been following your progress with considerable interest, not to say
-- contempt."  -- Zaphod Beeblebrox IV
-- uunet!sugar!karl, Unix BBS (713) 438-5018