For Programmers: Free Programming Magazines  


Home > Archive > Fortran > December 2005 > Byte length (Re: The Helsinki Code)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Byte length (Re: The Helsinki Code)
vic

2005-12-13, 8:14 am

Hi.

I'm a bit of an old fogey myself. Back in the late 70's, I worked on
the DECsystem-10 at my college. It had 36-bit words and ASCII character
encoding (7 bits) was typically used. When programming in assembly
language, you could set up a "byte pointer", which contained the
location of the buffer to be traversed, the index of the byte for
get/set operations, and the size of the bytes. In your code, you could
increment/decrement the byte pointer and do get/set operations on the
bytes. We typically used 7-bit ASCII characters, but DEC used "SIXBIT"
encoding (with only upper-case letters like a Cyber) for system calls,
e.g. file names. If you were needing EBCDIC, you could set up a pointer
for 8-bit bytes. Bytes could not cross word boundaries; in SIXBIT, you
got 6 per word; in ASCII, 7 per word (with one unused bit), in EBCDIC,
4 per word (with 4 unused bits). If your application warrented it and
you were so inclined, you could make bytes of any length from 1 to 35
bits, and the CPU would elegantly handle it!

I always thought the byte pointer was a nice abstraction for an
assembly language programmer -- it made a hard problem easy. Once the
pointer was set up, the code for traversal routines was independent of
the character set (or whatever you were traversing). Although I suspect
the IBM 8-bit byte had a lot to do with the current "standard"
nomenclature, I always thought it was the 8-bit microprocessor (and its
descendants) that settled the issue...

FWIW.
--vic

James Giles wrote:
> Ken Plotkin wrote:
>
> Well, I'm kind of an old fogey now, and "byte" has always
> meant, in my experience, "the size of a character". So,
> I've seen environments with 6-bit bytes, 9-bit bytes, even
> 12-bit bytes. It's somewhat like the definition of "word".
> We're all aware of platforms with 32-bit words as
> contrasted with 60-bit words, 64-bit words, 36-bit
> words, etc.
>
> To be sure, 8-bit bytes have probably always been the most
> common. That's always been what IBM used, and they
> dominate(d) the market. I don't recall any Digital Equipment
> Corp machine that didn't have 8-bit bytes either, and they
> were second only to IBM for many years.
>
> --
> J. Giles
>
> "I conclude that there are two ways of constructing a software
> design: One way is to make it so simple that there are obviously
> no deficiencies and the other way is to make it so complicated
> that there are no obvious deficiencies." -- C. A. R. Hoare


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com