* ISR handlers (interrupt handlers) * 
Author Message
 * ISR handlers (interrupt handlers) *

In referenced article, Israel Denis Jr. says...

Quote:
>Does anyone know where I can find some information to
>code and ISR (interrupt service routine), in c of course.
>I have seen ISR information in ASSEMBLY. But I don't
>know assembly.

This is a very system specific question.  There are several real
problems that you have to overcome:

1.  Planting the address of your 'C' ISR routine in the interrupt
    vector.
2.  Ensuring that the correct stack is used during the execution
    of your code.
3.  Getting the system specific information that will be passed to
    your ISR when it is executed.
4.  Ensure the correct exit sequence to restore the machine state.

In addition, you may have to involve yourself with modifying the
priority levels of the interrupt chain, and reading and writing status,
data and control information from I/O ports or memory mapped I/O
locations.

All of this is system specific.

If you are doing this on a Unix system, (I should say *inside* a Unix
system), you need the hardware details of the machine you are running
on, a Unix system development environment, and manuals on how to write
device drivers.

If you want to do it in DOS, it might be easier.  There are various
"API" calls to allow you to plant your routine address in the interrupt
vector, and return safely, etc - see the descriptions of the DOS
specific function calls in the library manual that comes with your
compiler.

In Windows, you can only do it if you have the appropriate Device
Driver Development Kit - but that will give you all the info you need.
--
Ray Dunn (opinions are my own) | Phone: (514) 938 9050
Montreal                       | Phax : (514) 938 5225



Mon, 13 Jul 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to define Interrupt, Interrupt Handler in C/C++

2. How to setup an interrupt handler

3. Interrupt handler

4. New tutorial (Interrupts & Handlers) - Please provide feedback

5. Interrupt Handler Re Direction

6. Interrupt Handlers, Function Calls, and the Stack

7. 8086 Interrupt handlers

8. Interrupt Handler in C(like dos-0x21)

9. interrupt Handler

10. microsoft c/ interrupt handler prob

11. Interrupt Handlers in C

12. Interrupt Handler in 'C'

 

 
Powered by phpBB® Forum Software