www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/27/06:32:09

From: dontmailme AT iname DOT com (Steamer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: printf, cprintf and CR/LF problem
Date: Sun, 27 Aug 2000 08:35:59 GMT
Organization: always disorganized
Lines: 27
Message-ID: <39a8d2ed.6649049@news.freeserve.net>
References: <s2fgqs8iobmdvbfrjfl2tfm57i2o9e2mov AT 4ax DOT com>
NNTP-Posting-Host: modem-102.ohio.dialup.pol.co.uk
X-Trace: news5.svr.pol.co.uk 967365360 934 62.137.86.102 (27 Aug 2000 08:36:00 GMT)
NNTP-Posting-Date: 27 Aug 2000 08:36:00 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Radical NetSurfer wrote:

> /* Still waiting to learn what a 16-bit entity is called on a 32-bit
> platform (since WORD has been made in an ambiguous term. */

There has never been a standard word size, so "word" has always been
ambiguous.  On a particular platform it ought to be obvious what "word"
means, but 386-compatible processors running in 32-bit mode represent
a problem - their native word size is 32 bits, but they are derived
from 16-bit processors where "word" has always meant 16 bits.

What's wrong with calling a 16-bit entity "two bytes"?  (Or "two octets",
if you want to be totally unambiguous.)  The term "short" is OK too, as
long as you only use it when talking about compilers on which a short is
16 bits (which includes all x86 C compilers that I've ever seen).

Or you may like to use the terminology that Donald Knuth has adopted
for future volumes of The Art of Computer Programming:

               1 byte  =  8 bits
    2 bytes  = 1 wyde  = 16 bits
    2 wydes  = 1 tetra = 32 bits 
    2 tetras = 1 octa  = 64 bits

The words "tetra" and "octa" are short forms of "tetrabyte" and "octabyte".

S.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019