Arm Community
Site
Search
User
Site
Search
User
Support forums
Keil forum
function pointer assignment
State
Not Answered
Locked
Locked
Replies
3 replies
Subscribers
20 subscribers
Views
3928 views
Users
0 members are here
Function Pointers
C
Options
Share
More actions
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
function pointer assignment
celia celia
over 12 years ago
Note: This was originally posted on 22nd December 2008 at
http://forums.arm.com
Hi,
I've a scenario here.
say, i have 2 functions. func1 and func2.
func1is at adddress 0x28 and func2 at some other location.
now, i have to pass func1 through func2 (where func1 is a callback function)
func2(func1);
while executing the above, i observed in the assembly instruction that,
ldr r3,0xdb1f0 is called where
At 0xdb1f0:
dcd 0x29 is found.
so that r0 =0x29 (address of func1+1)
Now my question is:
1. why the func1 address 0x29 (func1+1) is loaded instead of 0x28 (func1). what is the logic behind this behaviour.
Please some one answer my question. Though it is not obstructing my work, just curious to know the reason for this behaviour.
Thanks
0
Quote