Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: interrupt programming question
Posted by: mikro Jul,03.2009-11:56 

What do you mean by "Now I would like to do something after given number of ticks, how best to do that?" ? Every timer has its interrupt vector, i.e. you set desired timer frequency, your new vector, enable timer, do whatever you want in the timer routine and terminate with RTE. When you use XBtimer, you must call it with:

pea hand
move.w data,-(sp)
move.w control,-(sp)
move.w timer,-(sp)
move.w #$1F,-(sp)
trap #14
lea 12(sp),sp

and that 'hand' is that what you want. Look also for Mfpint(), Jenabint() and Jdisint() functions, I'm not sure if XBtimer automatically enables that interrupt. If I missed something, feel free to correct me :)







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
interrupt programming question saulot Jul,03.2009-10:41
  Re: interrupt programming question mikro Jul,03.2009-11:56
    Re: interrupt programming question saulot Jul,03.2009-13:47
      Re: interrupt programming question saulot Jul,03.2009-14:24
        Re: interrupt programming question charles Jun,12.2010-17:30


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson