We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I'm using a 80C51 with the MX - extension in my design. I want to build up a look up table (ROM) that contains the addresses of several functions. The address of each function must be split into high, middle and low - byte so that i can use it later as a "jump - table" in assembler.
For example: /* some functions. */ void fA(); void fB(); void fC();
/* Look up table: */ static code LUT [3][3] = {H(fA), M(fA), L(fA), {H(fB), M(fB), L(fC),...
I've already tried some macros which i found in other posts like:
#define L_B(v) (*(((unsigned char *) (&v) + 0)))
This macro doesn't work with function - addresses but works well on common pointers.
Best regards, Patrick