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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/17/02 09:23
Read: times


 
#30944 - Problem with functions
Halo everyone.

I have written a very long program (about 8K in hex) to do complex calculations and display them over the LCD. I've divided the program into several functions. The main program will call these functions when it wants to use them.

The problem I'm facing is when calling these functions, sometimes the values calculated by these functions are totally wrong or the LCD won't display anything at all.

The keyword here is 'sometimes'. After I've changed the positions of these functions in assembly (ie: cut the function, paste it on another location), it works perfectly. However, if I add in new code, the whole system will go wrong again. I need to switch the function positions once more to find the optimum location.

I'm doing this by trial and error and this eats up a lot of time. My guess is there is a problem with the function addressing. I'm using the Metalink compiler, and the calling command I'm using is CALL. As told in the manual, the compiler can automatically detect whether it is LCALL or ACALL.....

Anyone faced this problem before? Any suggestions and help are desperately needed. Thank you.


Regards,
Kuan Liung

List of 15 messages in thread
TopicAuthorDate
Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      
RE: Problem with functions            01/01/70 00:00      

Back to Subject List