I want to call a function that is not part of my program and that is located at an absolute address, how can I do this?
In C/C++ code:
typedef void (*fn_t)(unsigned long p1, unsigned long p2); fn_t fn = (fn_t)address; fn(10, 20);
In ARM assembly code:
ldr r0, =10 ldr r1, =20 ldr r2, =address mov lr, pc bx r2
Please sign in to leave a comment.