??? 03/14/11 12:42 Read: times |
#181574 - both Responding to: ???'s previous message |
Andy Neil said:
Do you mean optimal for passing bit parameters, or optimal as an implementation of a boolean data type? Ehm, both. Using bits in the bit-addressable area for boolean types seems optimal. The only backdraw is you can't easily create pointers to them and as such this is currently not supported. Passing bit parameters through fixed addresses also seems optimal for non-reentrant functions. Using (pseudo-)registers is less optimal. For reentrant functions passing them through pseudo-registers is optimal. The limitation of 8 bits in a function is the optimal case IMHO. Supporting more creates a lot of overhead for very rare cases. Maarten |
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 |