Mark Newland said: > The last thing I want to do is create yet another holy war on the great > aspects of one C compiler over another. What I would like to ask is the > complexity involved with re-writing my old CCS code to someother > compiler such as Hi-Tech. I know that there is some work involved when > going to/from Microchips native assembly language (*.asm) and Techtools > CVASM (*.src) for instance. However, it is not beyond a little time to > do so. Would converting from my old CCS code to Hi-Tech be better, > worse, or about the same as going from a *.asm file to a *.src file? I've tried to convert code written for CC5X to CCS, from Hi-Tech to CC5X, and from Hi-Tech to CCS, with varying degrees of success. Going from anything to CC5X I had no luck due to the limitations of CC5X, though I understand it's much improved since I tried it. Going from Hi-Tech to CCS and back you will run into a couple of issues: 1. CCS has built-in functions that HT doesn't, so some code will have to be written/re-written from scratch. For example, with CCS I say: setup_adc(ADC_CLOCK_DIV_32); setup_ccp1(CCP_CAPTURE_RE); setup_timer_1(T1_INTERNAL | T1_DIV_BY_1); With HT I'd have to rewrite all that to set individual control register bits. I could probably actually write functions in an #included file and leave the original source untouched. If it's a lot of CCS code, though, you may find there are a LOT of functions you will need to write from scratch. Those builtin functions, as well as an extensive driver library, are a couple of the reasons I selected CCS... 2. I *think* -- and I'm sure someone will correct me if I'm wrong -- HT considers int to be 16 bits and short to be 8 bits, as opposed to 8 and 1 bits in CCS. I also seem to recall HT has no single-bit type (maybe booloean?). Some typedefs might be needed to get past this. In short, if you've used none of CCS' compiler-specific features, it may not be a real big job. Otherwise it would probably be more of a line-by-line rewrite than simply making a few minor changes. Still not too difficult, of course, they are both C. As for going from .asm to C source... rotsa ruck, never heard of an animal like that. It would seem that writing such a beast would be an order of magnitude more difficult than writing a compiler. Dale -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.