|
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]
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.
|