Re: A89: interrupts
[Prev][Next][Index][Thread]
Re: A89: interrupts
>
>No.. not a different mask.. the mask is set to prevent other interrupts to
occur
>while you are changing the interrupt vector for auto int 1.. the mask (the
7) is
>infact the lowest interrupt to be allowed..
>so if you change the 7 to 5 then no interrupt below 5 will be executed..
so to
>just disable the ints (and not change the vectors then the:
>
>> move.w #$700,d0 ;temporary interrupt mask
>> trap #1 ;call supervisor program to
enable
>
>should be enough. (trap #1 saves the old mask in d0, that is why you can,
at the
>end just do another trap #1 to get the orignial interrupt mask back)
>
>the interrupt vectors are stored at $64 and are one word long each.. so
auto
>int 2 is at $68
>change $64 to $68 and this piece of code to change the vector for aut int 2
ok, so you can't disable auto int 2 without also disabling auto int 1, then?
I'll try doing this:
move.w #$700,d0 ;temporary interrupt mask
trap #1 ;call supervisor program to enable
it
move.l $64,(old_int) ;save old interrupt 1 address
bclr.b #2,($600001) ;clear bit that generates auto 7 interrupt when
writing to ($64)
move.l #int,($64) ;new interrupt 1 address
move.l #int2,($68) ;new interrupt 2 address
bset.b #2,($600001) ;then set it again
trap #1 ;replace temporary mask with old
mask
int2: ;dummy interrupt handler
rts
Follow-Ups: