Salma Salma - 1 year ago 125
C Question

Interrupt Vector Handler Address

I am developing a simple OS, which needs a small interrupt vectors. I have been reading about the interrupt vectors in order to understand the concepts.

Many of the resources refer to like this:
enter image description here

[1 ]

What confuses me is that how do I know the address of the interrupt handler? I know that I need to create different functions for the different types of interrupts but how can I know the address of the function?

I am developing my code in C.


Answer Source

Interrupt handler is, at the end, a function.

A function starts at "an address" and you can simply use its name to retrieve it.

The following code will warn about %p parameter type passed, but is explicative:

#include <stdio.h>

void dummy_ISR ( void )


int main ( void )
    printf("Address of function: %p\n", dummy_ISR);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download