| ??? 01/26/06 18:17 Read: times |
#108404 - Compiler Responding to: ???'s previous message |
Andy Neil said:
Dave Barrera said:
I'm just getting started with C and the 8051. What compiler are you using? I have decent experience with assembly In that case, you're probably best to learn 'C' on a PC, then move that to the 8051. Your assembler experience should tell you what bits of 'C' are going to be reasonable on an 8051... Specifically, what does the first "*" do for me in the second line. The '*' in 'C' means "pointer to" - more stars just means more layers of indirection! char *p_fred; // Pointer to a char char **p_fred; // Pointer to a pointer to a char char ***p_fred; // Pointer to a pointer to a pointer to a char #define timers ((dual_timers *)0x03FF6000
#define RAM0_ADDR (*(char far *)0x0D0000) Those would be VERY odd addresses for an 8051... Note that most 8051 'C' compilers have language extensions for doing things like that, rather than nasty #defines... I'm using a Keil compiler. I'll have to look at some of the documentation to get familiar with a language extension for mapping memory. Thanks! |
| Topic | Author | Date |
| Question about pointers with C | 01/01/70 00:00 | |
| Eh??? | 01/01/70 00:00 | |
| Compiler | 01/01/70 00:00 | |
| is that the Keil compiler you are using? | 01/01/70 00:00 | |
| Keil compiler | 01/01/70 00:00 | |
| keil has '51, '251, '16x, ARM which? | 01/01/70 00:00 | |
| A51 | 01/01/70 00:00 | |
| You mean C51 ? | 01/01/70 00:00 | |
| then what is this addressing? | 01/01/70 00:00 | |
| Addressing a RAM chip | 01/01/70 00:00 | |
| Addressing a RAM chip | 01/01/70 00:00 | |
| ah banking | 01/01/70 00:00 | |
| 80c51 Addressing | 01/01/70 00:00 | |
| Pedantic | 01/01/70 00:00 | |
| ridiculous | 01/01/70 00:00 | |
because | 01/01/70 00:00 | |
| Dereference | 01/01/70 00:00 | |
| Pointer hints | 01/01/70 00:00 | |
| No, that's wrong | 01/01/70 00:00 | |
| struct modelling memory-mapped IO | 01/01/70 00:00 | |
| I think it is time to stop replies to | 01/01/70 00:00 | |
| More pedantically | 01/01/70 00:00 | |
| Pointer hints | 01/01/70 00:00 | |
| start small | 01/01/70 00:00 |



