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

Dux Gregis wrote:
> 
> How do I do that?  What I have now is:
> 
>  move.w #$700,d0            ;temporary interrupt mask
>  trap #1                                ;call supervisor program to enable
> it
>  move.l $64,(old_int)        ;save old interrupt address
>  bclr.b #2,($600001)        ;clear bit that generates auto 7 interrupt when
> writing to ($64)
>  move.l #int,($64)                ;new interrupt address
>  bset.b #2,($600001)        ;then set it again
>  trap #1                                ;replace temporary mask with old
> mask
> 
> I probably want to put a different mask before the second trap #1, but what
> should I put?
> 
> Also, a saw a routine that used the instruction st.b, and I couldn't find
> what that instruction does anywhere ... is it the same as stop?
> 
> >
> >My guess is that it is auto int 2..  it triggers on the keyboard..
> >havent tried it yet though..
> >(have disabled all the interrupts..  that works ;)
> >
> >//Olle
> >
> >> Dux Gregis wrote:
> >>
> >> does anyone know which interrupt the OS uses to check keypresses?  I've
> >> installed an auto 1 interrupt handler, but that doesn't seem to stop the
> >> shift, diamond and 2nd keys from being handled by the interrupt; is it
> because
> >> I'm calling util::idle_loop or should I disable another interrupt as
> well?


References: