Hello all, can anyone give an example or link how to use a pointer to a function? I have a function with an (unsigned char) argument and which returns also an (unsigned char) value and I want to access the function via a pointer to function.. thank you
Google for "function pointer tutorial".
function pointers with the '51 is an 'architecture misue' and they should NEVER be used. One exception: if you can live with a maintenance nightmare and know the very minute details of fiddeling with the call tree, you may have a chance.
The '51 ain't no PC
Erik
One exception:
Second exception: Having an array of constant function pointers in code memory (i.e. a fancy version of a jump table). Apparently, the compiler/linker can deal with this sort of construct.