Gotcha! and here's howto store the address of the function byte-wise
Code:#include <stdio.h> void f(void) {} int main(int argc, char *argv[]) { void (*pf)(void); unsigned char *sp, t; pf = f; /* store lo byte */ t = (unsigned) pf & 0xff; sp = (unsigned char *) t; /* store hi byte */ t = (unsigned) pf >> 8; sp = (unsigned char *) t; }