Editing BoostC tiny Wiki
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
In addition to this page see: | In addition to this page see: | ||
− | + | *[[BoostC from the Fourm]] | |
− | + | *[[A Really Basic Guide to the PIC Microprocessor and BoostC]] | |
− | + | * and even more comming soon..... | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Tips/Tricks/Gotchas == | == Tips/Tricks/Gotchas == | ||
Line 55: | Line 40: | ||
Check you options, target should be right. Recently I had a problem with the Compiler location option. It seems to be a option of the project ( which makes sense if you want different projects to behave differently ) not the ide installation, so especially if you got the project from someone else check it. For me a bad compiler location made the build take forever and do nothing; the compiler gave a useful error message. | Check you options, target should be right. Recently I had a problem with the Compiler location option. It seems to be a option of the project ( which makes sense if you want different projects to behave differently ) not the ide installation, so especially if you got the project from someone else check it. For me a bad compiler location made the build take forever and do nothing; the compiler gave a useful error message. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Standard C Issues == | == Standard C Issues == | ||
Line 124: | Line 83: | ||
c = a + b * c | c = a + b * c | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Read This ==== | ==== Read This ==== | ||
Line 154: | Line 90: | ||
== How to pages == | == How to pages == | ||
− | + | [Index of sample code pages] showing sample code, showing the various ways tricky, or not so tricky issues have been tackled | |
== Optimization == | == Optimization == | ||
Line 166: | Line 102: | ||
*Is shifting better than multiplying/dividing by poweres of 2? | *Is shifting better than multiplying/dividing by poweres of 2? | ||
− | *does if( intcon & (1<<T0IF) ) work better than test_bit( intcon, T0IF )? | + | *does if( intcon & (1<<T0IF) ) work better than test_bit( intcon, T0IF )? |
*Is there a time penality to using local variables. | *Is there a time penality to using local variables. | ||
Line 190: | Line 126: | ||
if( test_bit( intcon, T0IF) ) | if( test_bit( intcon, T0IF) ) | ||
− | Looking at the generated code: it is identical, so why not use the clearer formulation? | + | Looking at the generated code: it is identical, so why not use the clearer formulation? |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Code Snips that may Be Helpful == | == Code Snips that may Be Helpful == | ||
+ | You are counting down and want to know when an unsigned number goes negative ( never ). You could declare it signed, slowing everything down. Instead check against FF. This assumes you do not use FF on the positive side. | ||
− | + | if ( 0xFF == ix ) .. | |
== Example Programs and Projects == | == Example Programs and Projects == | ||
Line 219: | Line 148: | ||
* [[Playing With PIC Pack]] A user developed package in BoostC for the PIC. | * [[Playing With PIC Pack]] A user developed package in BoostC for the PIC. | ||
− | * [[BoostC from the | + | * [[BoostC from the Fourm]] Information extracted and summarized from the BoostC Forum. |
* [http://en.wikibooks.org/wiki/C_programming Wikibooks: C programming] is about C programming in general (alas, focuses on programs running on desktop computers, rather than small microcontrollers). | * [http://en.wikibooks.org/wiki/C_programming Wikibooks: C programming] is about C programming in general (alas, focuses on programs running on desktop computers, rather than small microcontrollers). | ||
− | |||
− | |||
− |