Philippe Martin wrote: > John Machin wrote: > > > Philippe Martin wrote: > > > >> > >> Thanks John, I do not have a long available on the device: stuck with 16 > >> bits. > >> > > > > What does "available on the device" mean? Having a "long" is a property > > of a C complier, not a device. What is the CPU in the device? What is > > the C compiler you are using? N.B. Last time I looked, gcc would > > generate code for just about any CPU since Babbage's. I would expect > > *any* C compiler that is targetting a 16-bit CPU to provide a 32-bit > > long and generate reasonably efficient code for most simple operations. > > Is there no library of utility routines for *elementary* base > > conversions such as you need? Is there no 32-bit-arithmetic-simulation > > package? > > Hi John, > > I'm working on an embedded 8 bit device and have no choice as to which > cross-compiler to use: in this case the guy knows up to short and that's > it. >
What do you mean, no choice? You generate code, you stuff it into the device, it doesn't give a rat's where the code came from ... Perhaps we could help you better if you actually answered the questions, like: What is the CPU in the device? What is the C compiler you are using? Is there an assembler for the CPU that's in the device? Have you considered asking on a newsgroup where your problem might actually be on-topic, like: comp.lang.c a NG devoted to microprocessors ? -- http://mail.python.org/mailman/listinfo/python-list