CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Displaying constants

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vector



Joined: 07 Mar 2004
Posts: 7

View user's profile Send private message

Displaying constants
PostPosted: Sun Mar 07, 2004 11:34 pm     Reply with quote

Is there any easy way to find out what the compiler has calculated as a constant.
ie
#define servo_idle ((max_servo_len+min_servo_len)-min_servo_len)/2

in this case i can follow the asm list and see it has it correct
00D6: MOVLW 01
00D7: MOVWF 00
00D8: DECF 04,F
00D9: MOVLW F4
00DA: MOVWF 00
lines D6 and D9 0x01F4 = 500.
thats fine, not easy,but dooable. Elsewhere tho I have a longer array of calcs. it would be nice if the symbol map or call tree or something would divulge the list of constants.
asjad



Joined: 09 Mar 2004
Posts: 52
Location: Greater Manchester - UK

View user's profile Send private message

watch window
PostPosted: Tue Mar 09, 2004 2:25 pm     Reply with quote

I find that if you goto

Build your source code

goto view>watch (MPLAB)

scroll down until you see any variables you are intereseted
and watch their value change.

Hope this helps!!
_________________
Best Regards
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group