Re: 1 Byte has NOT 8 Bit



Keith Thompson wrote:
"jacki-dd" <jacki-dd@xxxxxxx> writes:

i'm going to port the lcc to an architecture, which has not 8 Bits
as smallest native size. I'd like to handle data types with 8, 9,
16, 18 Bits for example.

That's going to be difficult just in terms of C standard conformance.
CHAR_BIT (the number of bits in a byte) may be greater than 8 (but it
can't be less than 8). But every object other than a bit field must
have a size that's a whole number of bytes.

(Of course, not all compilers have to conform to the C standard.)

I doubt he means simultaneouosly. And he never mentioned a byte
size smaller than 8. It might show up some nasty built in biases
in the lcc code generators though.

--
Chuck F (cbfalconer@xxxxxxxxx) (cbfalconer@xxxxxxxxxxxxx)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE maineline address!


.