On: raising the semantic level of a program

ben bfranchuk at jetnet.ab.ca
Sun Jun 28 19:32:59 CDT 2020


On 6/28/2020 5:20 PM, Peter Corlett via cctalk wrote:
> On Sun, Jun 28, 2020 at 01:32:02PM -0700, Chuck Guzis via cctalk wrote:
> [...]
>> Why is byte-granularity in addressing a necessity?
> 
> Because C's strings are broken by design and require one to be able to form a
> pointer to individual characters.
> 

Just what is a NON broken string design?

>> It's only an issue if you have instructions that operate directly on byte
>> quantities in memory.
> 
> One wheeze is to just declare that bytes are the same size as a machine word. C
> doesn't require char to be exactly 8 bits, but merely at least 8 bits. However,
> a lot of C code will break if char, short, int and long aren't exactly the same
> size as they are on x86. Mind you, a lot of it is still broken even if they
> are...

DISC I/O seems to have stage packed formats of bytes shorts and longs 
all packed a character array. Directory structures or inodes come to mind.

The x86 is broken period.
'int' size depends on the compiler making porting programs interesting, 
as well as macro processor and make files.
Ben.






More information about the cctalk mailing list