Writing function on specific address

Discussion in 'C' started by answerme, Jan 19, 2015.

  1. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    Hi
    Is there any way that we can write function into specific address. Is it possible with pointer to constant .
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    This would be compiler specific, so you'll have to check your compiler documentation. If you need to know the address of a function then you can define a pointer to the function, but to write a function at a specific memory location (if microcontroller programming for example) then you'll need to use compiler specific syntax.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice