??? 04/14/04 07:56 Read: times |
#68452 - RE: suggestion for 8052.com code libraries Responding to: ???'s previous message |
hi,
there you said: The purpose of these rules is to structure and to standardize the code wrote in C for embedded applications in order to give enough documentation and to trace the modifications. Well, but which processors these rules are for? Programming of microcontrollers is very setsitive because it is related with their hardware. For example, you suggest us to use typedef unsigned int BOOL; /* 1-Bit. */Hmm, 8051 has another type for such purposes and it is called bit, for example, bit func(bit x, bit y);so I do not see a reason why I must use int at place where I may use just a bit. Following those rules, for 100 variables of type BOOL I lost 200 bytes instead 13 bytes. Thanks, I better define typedef bit BOOL;If you say me "it needs for compatibility" then I answer you: "no way". My code is compatible as long as it is used with same equipment. If you try to transfer it from 8051 to, let say, MC68060 then I say you good luck. But for 8051->8052 it is full compatible and so, finally, I am anti-globalist if we talk about rules "to structure and to standardize the code wrote in C for embedded applications" without indication of used platform. Regards, Oleg |
Topic | Author | Date |
suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries![]() | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 | |
RE: suggestion for 8052.com code libraries | 01/01/70 00:00 |