| ??? 06/04/03 20:23 Read: times |
#47543 - Warning for C users (especially Keil) Responding to: ???'s previous message |
A very common way for 'C' programmers to implement state machines (specifically, Finite State Machines, FSMs) is by the use of tables of function pointers.
Keil C51 imposes a number of very important limitations to function pointer usage on the 8051 I strongly suspect that the same applies to other 8051 'C' compilers. Before using function pointers in Keil C51, it is essential that you carefully read the following: Application Note 129: Function Pointers in C51 BL51: CALL TREE USING POINTERS TO FUNCTIONS C51: PROBLEMS WITH FUNCTION POINTERS OVERWRITING VARIABLES For other 8051 'C' compilers, be very sure to understand all the issues and/or limitations with their function pointer implementations |



