| ??? 03/20/02 18:53 Read: times |
#21029 - RE: bit array in C (for 8051) |
The problem here is the magical word ARRAY.
When you create an array the compiler MUST use math to figure out the location of BIT_ARRAY[23]. This is EASY for the compiler. However, the 8051 does not have an instruction that lets you set a bit based on an index. You only have SETB and CLR. And, these instructions REQUIRE a fixed address. This should also explain why pointers to bits aren't supported. It's impossible! I guess that a self-modifying program could be created. However, that means that you must have some von Neumann RAM in your architecture. And, few 8051 systems incorporate that. Jon Ward Keil Software |
| Topic | Author | Date |
| bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) | 01/01/70 00:00 | |
| RE: bit array in C (for 8051) - Kapil | 01/01/70 00:00 | |
Bit pointers in C51 | 01/01/70 00:00 |



