??? 06/05/08 00:21 Read: times |
#155505 - C & 8051 Responding to: ???'s previous message |
I'd suggest you read up the compiler manual. The problem you're facing is not 'c' as such but how the compiler copes with the specifics of the 8051 architecture. If you have a look at the reg51.h file you'll see how the SFRs are defined. Once they're defined correctly, your 'c' code simply accesses them as a variable - the compiler takes care of the rest.
Each brand of compiler (and version! re IAR!) does things differently - thus you need to read the manual! The IAR compiler I use describes in length the specifics for the 8051 and the various memory models. Without knowing this information, you're just going to keep on hitting brick walls. I programmed in assembler for many years but I almost universally use 'c' nowadays. More people know 'c' than assembler and the compiler does a lot to check for certain types of errors. |
Topic | Author | Date |
Problems Controling SFRs | 01/01/70 00:00 | |
Seems simple | 01/01/70 00:00 | |
What Compiler ? | 01/01/70 00:00 | |
C & 8051![]() | 01/01/70 00:00 |