[Icc-avr] 3 byte long?

Sean Ryan sryan at pmsi.cc
Wed Sep 26 09:47:51 PDT 2007


I've done similar on the rabbit CPU..  Created a 3 byte structure and a few
functions to implement the basic math..   (I've also done 20 bit and 12 bit
math for stored arrays (4 bits per item count on an embedded CPU (for
instance 4 flags, etc)).

Another option is to use longs in your calculations, but store them as three
byte values.  (do a move or the like in and out)

Sean

On 9/21/07, Ira <ira at extrasensory.com> wrote:
>
> I'm working on a project and I'd rather not go to the next bigger
> processor. The easiest place to save space would be if there was an
> easy way to implement 3 byte longs. I could do it all by hand but the
> code gets so much messier and know in this code that the fourth byte
> will never be anything but zero.  Am I dreaming or has this been done?
>
> Ira
>
> _______________________________________________
> Icc-avr mailing list
> Icc-avr at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-avr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20070926/19767825/attachment.html


More information about the Icc-avr mailing list