??? 03/08/11 08:49 Read: times |
#181491 - You need to ask Keil Responding to: ???'s previous message |
Praveen Kumar said:
main concern is code operation. So why did you bring in the red herring of PC-Lint? Praveen Kumar said:
When a bit type is used in function parameters, what registers / flags come into picture? You are correct - the Keil manual is incomplete in that it does not document this! You should complain to Keil (note that there is a feedback option on each of their manual pages) Our main concern is to make the code more simplified What do you mean by "simplified"? Simple for whom - the programmer, or the 8051? But, what is the actual impact on the code execution internally? How will the compiler treat this issue? As already noted, the documentation is incomplete on this issue, so you have 2 choices: 1. Contact Keil; 2. Inspect the generated code. However, in your original example, you seemed to be talking, effectively, about a "boolean" type. Remember that, for "boolean" operations, the 'C' programming language considers only whether the value is equal to zero or not - so using bit variables might not give much advantage in this respect? What is the _BIT_GROUP_ storing That part is documented and how can it handle the bit function parameters without conflict In the same way that it does for any other parameters passed in memory. |
Topic | Author | Date |
bit type function parameter | 01/01/70 00:00 | |
Look at instruction set | 01/01/70 00:00 | |
What is your actual problem here? | 01/01/70 00:00 | |
main concern is code operation. | 01/01/70 00:00 | |
parameter converted to global variable | 01/01/70 00:00 | |
No reentrancy | 01/01/70 00:00 | |
Is it the 8051 instruction set? | 01/01/70 00:00 | |
Still looked at the bit capabilities of the processor? | 01/01/70 00:00 | |
You need to ask Keil | 01/01/70 00:00 | |
Use bool to simplify | 01/01/70 00:00 | |
BOOLEAN directive used | 01/01/70 00:00 | |
stdbool | 01/01/70 00:00 | |
Use stdbool | 01/01/70 00:00 | |
Optimal implementation | 01/01/70 00:00 | |
SDCC | 01/01/70 00:00 | |
Optimal for what? | 01/01/70 00:00 | |
both | 01/01/70 00:00 |