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

Search found 7 matches
CCS Forum Index
Author Message
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Tue Jan 26, 2021 7:48 am   Subject: Thank you for your patience.
Now I realize.
Of course they are executed. Where do you think the processor goes after
the instruction at 0x3C?.
Look at the order I posted the code.
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Tue Jan 26, 2021 7:06 am   Subject: Please observe the generated .hex file that I attach
You are correct that the order that appears in the list corresponds to the order in which the instructions were written and not to the order in which the code is generated.
I attach the .hex file tha ...
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Tue Jan 26, 2021 4:07 am   Subject: Forgive the insistence.
Hello:

I understand that generating the code of the function in the place it is called increases the execution speed as you well explained. The inline function is used for this purpose.
I can't un ...
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Tue Jan 26, 2021 2:21 am   Subject: IMHO it is very poor code generation.
Hi Ttelmah:
IMHO it is very poor code generation.
Even when the function is called more than once, the code in the function declaration is generated as many times as it is called in the program as c ...
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Mon Jan 25, 2021 3:16 pm   Subject: inline function
Does that mean you still need an answer ? Your question was:

I don't understand what the code generated by the compiler at addresses
00040 to 00044 of the following .lst file is used for.

00 ...
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Mon Jan 25, 2021 3:00 pm   Subject: inline function
The suma() function adds two numbers and returns the result.
int suma(int a, int b) {
return (a +b);
}
It's put "inline" to eliminate the need for CALL and R ...
  Topic: inline function
Felo

Replies: 16
Views: 40059

PostForum: General CCS C Discussion   Posted: Mon Jan 25, 2021 2:20 pm   Subject: inline function
Question:
What is the code that the compiler generates for inline functions used for?
Question details: I don't understand what the code generated by the compiler at addresses 00040 to 00044 of the ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group