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 support@ccsinfo.com

Interpretation of the .lst file

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







Interpretation of the .lst file
PostPosted: Thu Jan 11, 2007 2:13 am     Reply with quote

Hi,

Sometimes I look at the .lst file to see what the compiler makes of my c. Usually it is easy to see what statements generate what code. I recently had a question about a #USE rs232 that I needed to see the compiled code for. It took me a lot of time to realise that the code for this statement is in the beginning of the main() function and nowhere near the actual #USE rs232 statement in the list file.

My question: could I have known that? Is there a way to 'know' where code is placed?

Thanks,

Paul Holthuizen
PCWH 3.248
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 11, 2007 5:42 pm     Reply with quote

See this FAQ article:
http://www.ccsinfo.com/faq.php?page=lst_out_of_order

Some of the initialization code for the #use libraries is put at
the start of main(). For example, that's where the compiler
puts the setup code for the UART if you specify #use rs232().

The code that performs the UART functions is usually placed
inline if it's short, such as the putc() code for a hardware UART.
It's placed under the #use rs232() statement if it's longer code,
such as for a 'soft' UART, or if parity calculations are required, etc.,
because the compiler typically will 'call' that code instead of placing
it inline.
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