I'm working on a class project that we are building a simple kernel on Tern TD40 board. That thing has two internal clocks. We are required to use one of them to schedule task control block. we need to service an interrupt using the timer at the end of each task cycle and I don't know how to do that.
Do you have any RTOS running on that board? If you do, you will need to find out how to plug in yout interrupt handler into that RTOS. If you don't than, find any book about x86 real mode programming, and all description on interrupt handling is there. You may want to search this board, to see if there were previous posts regardng those books.
from what u have writen i understand that u want to switch tasks with the help of timer interrupt.
1. configure one of the timer say timer1 to interval mode with 1 ms time. So after
every i ms time it will raise an interrupt.
2. place your scheduler at this interrupt address. The job of scheduler is if more than
one task are present move the running task to "ready" state and move the other
but higher priority task to "runnung" state.
3. your scheduler internaly need to call dispatcher which will take care for saving and
restoring task contest.