-----Original Message-----
From: cctalk-bounces at
classiccmp.org
[mailto:cctalk-bounces at
classiccmp.org] On Behalf Of Chuck Guzis
Sent: 31 January 2012 20:14
To: General Discussion: On-Topic and Off-Topic Posts
Subject: Re: C compilers and non-ASCII systems
On 31 Jan 2012 at 14:17, schoedel at
kw.igs.net wrote:
On Tue, 31 Jan 2012 10:43:59 -0800, Chuck Guzis
wrote
> Does C require 8-bit byte addressability? Are other
"byte"
lengths
> > permitted, such as 9 bits for system using 36 bit words?
>
Any thing longer than "8". The constant CHAR_BIT as defined in
"limits.h"
should say how many bits/byte...
The smallest
unit addressable in standard C, the char, must be at
least 8 bits. It can be 9, or 36 for that matter.
That's what I thought--and I seem to remember a port of Unix to the
Univac 1100 series that used 9 bit "bytes". So that &0x0f will
have issues for creating dumps on that machine.
The Honeywell L66 series (and later the DPS8) which some one elase has
mentioned has 36-bit words which can be treated as 4x9-bit bytes or 6x6 bit
BCD characters. I only ever wrote in "B" on these machines which had no
notion of characters, everything was done in terms of words.. There were
routines to convert to characters for i/o..
Writing truly portable code is daunting. I recall
that when
"portable" text-based programs were written in FORTRAN, the first
data card in the deck was the character set for the hardware, read in
A1 format. In fact, you didn't even know that the system you were
working on did arithmetic in binary.
We seem to have forgotten decimal computers. How many modern
computer languages REQUIRE binary arithmetic and logical operations?
--Chuck
Dave Wade G4UGM
Illegitimi Non Carborundum