8bit 6809 ints

smith at NRL-AIC.ARPA smith at NRL-AIC.ARPA
Sat Jun 16 02:37:00 AEST 1984


From:  Russ Smith <smith at NRL-AIC.ARPA>

I've written reams of C code (on a z80 machine) where I would have
loved to get away from the fact that the ints on my C compiler (C/80)
are 16 bits rather than 8 bits. Because K&R says most everything is
converted to int in expressions a good portion of the compiled code
execution (actually dealing with chars) is comprised of calls to conversion
routines. In my case, much of the code deals with very small absolute
values for numbers hence my "memory-saving" use of chars. Methinks the
6809 must be really lousy at 16 bit arithemetic. It would certainly be
the case that 8 bit arithemetic for most of a benchmark program would
tend to greatly enhance the performance (relative to other compilers)....

Russ <Smith at nrl-aic>



More information about the Comp.lang.c mailing list