delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/19/13:21:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020219084838.00aa8e08@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 19 Feb 2002 08:56:01 -0800
To: David <cupcake AT otaku DOT freeshell DOT org>, Mark Himsley <mark AT mdsh DOT com>
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: od
Cc: cygwin AT cygwin DOT com
In-Reply-To: <200202191403.g1JE3tx09996@otaku.freeshell.org>
Mime-Version: 1.0

Sir,

You have got to be kidding.

For the record, the x86 architecture is little-endian, PowerPC, e.g., is 
bid-endian. On the off chance that you're running Windows NT (and 
Cygwin???) on an Alpha, I have to admit I don't know which byte ordering it 
uses.

You will get the 16-bit output you want from od (any radix) if you run 
Darwin PPC, MacOS X or LinuxPPC, among other systems.

Otherwise, what you request ain't gonna happen. If you want od to interpret 
and display integers with sizes greater than 1 byte in a way that differs 
from that of the local processor, you could create a hacked version of "od" 
for your personal use.

Randall Schulz
Mountain View, CA USA


At 06:03 2002-02-19, David wrote:
>Hi Mark,
>
>Thank you for your reply to my message about the od utility: I wrote:
>
>  >> I created at test file with 4 characters in it:
>  >>
>  >>     HTTP
>  >>
>  >> Then, I run od -bcx and I get:
>  >>
>  >> 110 124 124 120 012 000
>  >>   H   T   T   P  \n  \0
>  >> 5448 5054 000a
>
>You wrote:
>
>  > That is correct in this little-endian platform, see
>  > http://info.astrian.net/jargon/terms/l/little-endian.html
>  >
>  > >You can see that the hex values in the last line are reversed.
>  > >I think they should be 4854 5450 000a.
>  >
>  > Only if you were on a big-endian platform.
>
>I can understand what you are saying if I interpret it to mean that the 
>hex storage values on my machine WindowsNT - which I assume from you 
>message is a big-endian platform - are faithfully represented by the 
>output from the od -bcx display.
>
>What then surprises me is that the octal representation of this same 
>storage is 110 124 124 120 which is what I would expect.
>
>It seems to me that you are suggesting that the only correct 
>representation of the hex storage values would require od to ouput an 
>ascii value of THPT. I reject, and od itself contradicts, this 
>interpretation of the storage values as being meaningful.
>
>I urge you to reconsider your opinion and to modify od to output 4854 5450.
>
>David


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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