Re: [uCsimm] cs8900 & wait-states

From: Tom Walsh (tom@cyberiansoftware.com)
Date: Wed Dec 13 2000 - 00:49:21 EST


"D. Jeff Dionne" wrote:
>
> On Tue, 12 Dec 2000, Tom Walsh wrote:
>
> > market to the detriment of the low-end. The only time we get cool
> > embedded stuff to use is when they sell a U.S. automobile manufacturer
> > on using that chip, after the chip is no longer needed by the auto
> > people, it usually gets dropped. The only chip that they ever really
> > kept around was the 68HC11 due to the suprising popularity of the device
> > in the embedded space (to Motorola's surprise). IMHO, Motorola does not
> > understand the embedded market, they bumble along and eventually produce
> > something interesting to the rest of us (DragonBall, 683XX cores).
>
> Interesting, that's exactly how I've always thought of Intel! Mot has
> always known exactly how/what/where and Intel just bumbles along getting
> lucky. Just goes to show that there is no agreement on this subject at
> all, just advocates for both.
>
> As for little/big endin, seems to me that the reason ppl like big endin is
> it's right reading in memory. People like little endin because this (and
> it's equiv. in other languages and of course assembler) work naturally...
>
> long i = 0x1234;
> short *p = &i;
>
> printf("0x%x",*p);
>
> Big endin machines print 0x0, little endin machines print 0x1234. IMHO,
> bad code should produce bad results, not hide them so it breaks
> later. BTW, if you have trouble with the `more` utility shipped with some
> uClinux CDs, it's caused by exactly this bug. uC-src more was originally
> written for ELKS, Linux for 8086, which is a little endin machine and
> effectively hid the bug.

Agreed, a more portable form could have been:

long i = 0x1234;
short j = (short) i;
short *p = &j;

Blame the coder for bad code, AYMK, this type of junk code is do-able
under the C language, but made naughty by ANSI. What troubles is that
the gcc compiler should have produced a warning about the type
conversion (conversion between types without a typecast) and the coder
ignored the warning (or turned them off entirely).

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
'www.openhardware.net', 'www.cyberiansoftware.com'
"Windows? No thanks, I have work to do..."
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:39 EST