Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/21/05 17:27
Read: times


 
#95508 - Call table?
Responding to: ???'s previous message
Neil Kurzman said:
Or maybe a table of pointers will get you close.

That'd be a table (array) of Function pointers - can be a very effective way to implement things like menus & state machines in 'C'.

BUT Beware!


You need to be very careful about the restrictions for function pointers in 'C' on an 8051:

http://www.8052.com/forum/read.phtml?id=88433

List of 20 messages in thread
TopicAuthorDate
Coding a Jmp table in C            01/01/70 00:00      
   Jmp Tables in C            01/01/70 00:00      
   you do not            01/01/70 00:00      
      Call table?            01/01/70 00:00      
   Of course not!            01/01/70 00:00      
   use jmp@a+dptr            01/01/70 00:00      
      jmp table not in C            01/01/70 00:00      
         Wrong ends of sticks?            01/01/70 00:00      
         You do not control the Compiler Output            01/01/70 00:00      
   You can not have your cake and eat it to            01/01/70 00:00      
   Jump Table in C            01/01/70 00:00      
      Call Table? (again)            01/01/70 00:00      
         Call Table? (again)            01/01/70 00:00      
      I never did use function pointers            01/01/70 00:00      
         No pain, no gain.            01/01/70 00:00      
            the overlaying            01/01/70 00:00      
            There can be a gain.            01/01/70 00:00      
               My 2 cents worth            01/01/70 00:00      
                  Incorrect            01/01/70 00:00      
                     As Matter of Fact....            01/01/70 00:00      

Back to Subject List