[A89] Re: Traps...
[Prev][Next][Index][Thread]
[A89] Re: Traps...
>I've got that up and running... with one problem, the routine never gets
called;
>in fact, the trace interrupt never happens according to vti! I set the
trace bit
>using move #$4000,sr, and yes I'm in supervisor mode when I do that :)
I've also
>made the correct entry in the vector table at the beginning of the ram...
You're setting the wrong bit :) To enable trace interrupts:
move #$a000,sr
Bit 15 of SR must be set. I guess you could move 0x8000 as well, which
would put you in user mode.
The first trace exception will occur after the next instruction has
executed. For example:
move #$a000,sr
nop
<-- trace interrupt occurs right here after the NOP instruction has finished.
lea foo,a0
Of course, it doesn't have to be a NOP, it can be anything. In my Sega
Saturn 68K debugger, I perform a jump to the start of the user's program.
Works like a charm!
Bart
References: