Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/05/02 09:04
Read: times


 
#23934 - RE: 8051 vs microchip pic
"Remember C is C. No matter what your target board is based on (PC,8051 or PIC)."

Well, yes and no: 'C' is 'C' - but to get anywhere with these sort of processors, you are going to need certain processor-specific to the standard language.

Keil C51 provides extensions such as bit, sbit, sfr, the memory-space keywords data, xdata, etc, a pointer implementation to cope with the different memory spaces, etc, etc, etc...

I'm sure all the other 8051-targetted compilers provide similar extensions.

By careful design, you can isolate these compiler-dependencies; eg,
#if defined( __C51__ )
// For Keil C51, use the m-space keyword extensions
#define  DATA  data
#define IDATA idata
#define PDATA pdata
#define XDATA xdata
#else
// For other compilers, remove the m-space keyword extensions
#define  DATA  
#define IDATA 
#define PDATA 
#define XDATA 
#endif

and similarly for all the other extensions.

List of 23 messages in thread
TopicAuthorDate
8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic/Andy            01/01/70 00:00      
RE: 8051 vs microchip pic/Andy            01/01/70 00:00      
RE: 8051 vs microchip pic/Andy            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic - Gordon            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      
RE: 8051 vs microchip pic - Gordon            01/01/70 00:00      
RE: 8051 vs microchip pic - Gordon            01/01/70 00:00      
RE: 8051 vs microchip pic - Gordon            01/01/70 00:00      
RE: 8051 vs microchip pic - Gordon            01/01/70 00:00      
RE: 8051 vs microchip pic / Peter            01/01/70 00:00      
RE: 8051 vs microchip pic / Mahmood            01/01/70 00:00      
RE: 8051 vs microchip pic            01/01/70 00:00      

Back to Subject List