[Coco] Basic09 Level 3

Wayne Campbell asa.rand at gmail.com
Wed Aug 14 14:46:57 EDT 2013


Actually, that was based on an assumption I made years ago. Thanks for the
correction. :)

Wayne
On Aug 14, 2013 12:24 PM, "John W. Linville" <linville at tuxdriver.com> wrote:

> On Tue, Aug 13, 2013 at 07:10:05PM -0700, Wayne Campbell wrote:
> > That would be awesome too! On the subject, there is a difference between
> > what defines a short, an int and a long between 6x09 and 680x0
> processors,
> > for those who may not know.
> >
> > 6x09: short: 2 bytes; int: 2 bytes; long: 4 bytes
> > 680x0: short: 2 bytes; int: 4 bytes; long: 8 bytes
>
> Not sure which compiler you are using, but I recall the 680x0 using
> 4 bytes for a long (i.e. same as int).  This is consistent with the
> "move.l" and similar mnemonics in the 68000 assembly language.
>
>         http://en.wikipedia.org/wiki/Motorola_68000
>
> FWIW, I think the Alpha compilers used 8 bytes for long (but maybe
> 4 bytes for int), while most other arches went to "long long"
> for 8 byte types.  Various other CPUs and compilers have different
> conventions as well.
>
> All this confusion about size of integral types is what led to the
> creation of the stdint.h header file in the C99 spec...
>
>         http://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h
>
> Hth!
>
> John
> --
> John W. Linville                Someday the world will need a hero, and you
> linville at tuxdriver.com                  might be all we have.  Be ready.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list