OD outputs the hex from right to left?...hex dump utility...

Dave Arnold avr_fan@nettaxi.com
Sun Jul 2 20:10:00 GMT 2000


hi Doug,

ok, I think that might be what I'll have to do.
I was just looking for something quickly avaibable.
I know there's lots of utilities like this out on the net
but I just don't have much luck finding a match.

Currently I'm using Textpad and opening files in
binary mode which formats like the way I want.
Only thing is Textpad runs on windows and is
not very portable.

I've written a program like this before but just
was feeling a bit lazy.

I don't think the computer endian matters because
you just read() 1 byte at a time from the file and
printf() in the order they're read.  I don't know why
od is printing every 4 bytes in reverse when showing
the hex values.

/dAVe

-----Original Message-----
From: Doug Wyatt <dwyatt@sunflower.com>
To: Dave Arnold <avr_fan@nettaxi.com>
Cc: cygwin@sourceware.cygnus.com <cygwin@sourceware.cygnus.com>
Date: Saturday, July 01, 2000 9:17 PM
Subject: Re: OD outputs the hex from right to left?...hex dump utility...


Hi,

I would suggest either of the following:

1.  your requirements are so narrow and specific you could probably
     write a tool to do what you want, in C or Perl, in less than an hour.

2.  use a big-endian computer, so the bytes are in the order you want
     them (e.g. MC 68xxxx, or  the pending IA-64).

Regards,
Doug Wyatt



> hi Tim,
>
> I just realized that the od dump utility is dumping the hex values
> from right to left and then dumping the ascii values from left to right.
>
> This makes it very hard to read.  Is there a flag or option to make the
> output of ascii and hex columns to be in the same order?
>
> here's a sample output.
>
>       000000 00000009 34333231 bf003635 00000078
>               ht nul nul nul   1   2   3   4   5   6 nul   ?   x nul nul
nul
>       000010 454c4f53 4f525443 5343494e 0000ea00
>                S   O   L   E   C   T   R   O   N   I   C   S nul   j nul
nul
>
>
> I like the output to appear like so:
>
>       000010 534f4c45 4354524f 4e494353 00ea0000
>                S   O   L   E   C   T   R   O   N   I   C   S nul   j nul
nul
>
> or even better like this:(all on one line, only letters and number seen on
> ascii view and a '.' for everything else)
> (also all on one line is much more readable)
>
>       000010       000010 534f4c45 4354524f 4e494353 00ea0000
> SOLECTRONICS.J..
>
> Any help or suggestions on this would be very welcomed.
>
> /dAVe
>
>
> -----Original Message-----
> From: Tim Prince <tprince@computer.org>
> To: Dave Arnold <avr_fan@mailandnews.com>; cygwin@sourceware.cygnus.com
> <cygwin@sourceware.cygnus.com>
> Cc: mail and news <avr_fan@mailandnews.com>
> Date: Saturday, July 01, 2000 6:35 PM
> Subject: Re: looking for good hex dump utility...
>
>
> >If od doesn't match your description, it might help if you would
> >clarify.
> >
> >Tim Prince
> >----- Original Message -----
> >From: "Dave Arnold" <avr_fan@nettaxi.com>
> >To: <cygwin@sourceware.cygnus.com>
> >Cc: "mail and news" <avr_fan@mailandnews.com>
> >Sent: Saturday, July 01, 2000 6:10 PM
> >Subject: looking for good hex dump utility...
> >
> >
> >> hi,
> >>
> >> can anyone recommend a good, simple hex dump utility that's
> >> available with very portable source code in c/c++ or java which I can
> >> build and use on any of the variety of GNU supported platforms?
> >>
> >> I just want something that I can take with me from one computer
> >> to the next as needed without having to find one for each platform
> >> as I go.
> >>
> >> Just would like be able to dump file contents and see hex and ascii
> >> values line by line 16bytes at a time with byte address in hex next
> >> to each line.
> >>
> >> thanks,
> >> /dAVe
> >>
> >>
> >
> >
> >
> >--
> >Want to unsubscribe from this list?
> >Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> >
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list