Discussion:
Hex display order option for DUMP ?
(too old to reply)
Simon Clubley
2021-07-22 20:11:06 UTC
Permalink
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?

By all means leave the default as it currently is, but VMS DUMP output
is hard to read when you are used to how all other dump programs
I have used do it.

Right to left might make some sense for looking at numeric values
when you are used to it, but it's a real pain when looking at pure
binary data.

I've looked at the online help for the latest VSI Alpha VMS version
and don't see any option for this.

Thanks,

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Steven Schweda
2021-07-22 21:07:56 UTC
Permalink
[...] just like every other hex dump program I have used does ?
Port one of them to VMS? I know nothing, but I'd expect that someone
has done enough of a GNU Coreutils port to get "od" working.
John Reagan
2021-07-23 13:52:46 UTC
Permalink
[...] just like every other hex dump program I have used does ?
Port one of them to VMS? I know nothing, but I'd expect that someone
has done enough of a GNU Coreutils port to get "od" working.
The current GNV kit has 'od' in it.
Simon Clubley
2021-07-23 17:04:50 UTC
Permalink
Post by John Reagan
[...] just like every other hex dump program I have used does ?
Port one of them to VMS? I know nothing, but I'd expect that someone
has done enough of a GNU Coreutils port to get "od" working.
The current GNV kit has 'od' in it.
I don't know about anyone else but I use DUMP to look at files both
at record level and at block level. That's why putting it in DUMP
would be useful.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Stephen Hoffman
2021-07-22 22:48:54 UTC
Permalink
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
You prefer the big endian format? Little-endian is easier to read
numbers. But okay.

xxd is in the vim port, can be used for binary patching, and a port is
available at Polarhome.

mdump, hexdump and others are in the archives at digiater, as is the
dix file editor.

Wouldn't surprise me to find od and xd in GNV, too:
https://vmssoftware.com/products/gnv/
--
Pure Personal Opinion | HoffmanLabs LLC
V***@SendSpamHere.ORG
2021-07-23 11:45:22 UTC
Permalink
Post by Stephen Hoffman
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
You prefer the big endian format? Little-endian is easier to read
numbers. But okay.
I think Simon's request is a stupid way to display little endian data.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Simon Clubley
2021-07-23 17:09:41 UTC
Permalink
Post by V***@SendSpamHere.ORG
Post by Stephen Hoffman
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
You prefer the big endian format? Little-endian is easier to read
numbers. But okay.
I think Simon's request is a stupid way to display little endian data.
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)

Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
V***@SendSpamHere.ORG
2021-07-23 17:36:52 UTC
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
Post by Stephen Hoffman
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
You prefer the big endian format? Little-endian is easier to read
numbers. But okay.
I think Simon's request is a stupid way to display little endian data.
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
What is non-printable in:

BC00BC02 00730A02 00040000 000F00BB 00BB0200 6E6F6974 06050007 0000000F ........tion..>>.>>.........s..1/4.1/4 000000
00BE00BE 02006562 03030005 0000000F 00BD00BD 02006F02 02000400 00000F00 .........o..1/2.1/2.........be..3/4.3/4. 000020
00740902 00040000 000F00BF 00BF0200 65636E65 6373656C 0309000B 0000000F ........lescence..?.?.........t. 000040
C2020066 04020004 0000000F 00C100C1 0200730A 02000400 00000F00 C000C002 .A.A.........s..A.A.........f..A 000060
72696E03 06000800 00000F00 C300C302 00737568 70040500 07000000 0F00C200 .A.........phus..A.A.........nir 000080
70030300 05000000 0F00C500 C5020073 05020004 0000000F 00C400C4 02006D61 am..A.A.........s..A.A.........p 0000A0
69050400 06000000 0F00C700 C7020064 65050300 05000000 0F00C600 C6020074 t..AE.AE.........ed..C.C.........i 0000C0
05020004 0000000F 00C900C9 02006E6F 06030005 0000000F 00C800C8 0200676E ng..E.E.........on..E.E......... 0000E0
00070000 000F00CB 00CB0200 656C6261 72030600 08000000 0F00CA00 CA020073 s..E.E.........rable..E.E....... 000100
04000000 0F00CD00 CD020065 04020004 0000000F 00CC00CC 02006E6F 69740505 ..tion..I.I.........e..I.I...... 000120
02000400 00000F00 CF00CF02 00730502 00040000 000F00CE 00CE0200 64050200 ...d..I.I..(R).(R)....s..I.I 00012.. 000140
05050007 0000000F 00D100D1 02006465 05030005 0000000F 00D000D0 02006E04 .n..TH.TH.........ed..N.N......... 000160
06000800 00000F00 D300D302 00730502 00040000 000F00D2 00D20200 746E656D ment..O.O.........s..O.O........ 000180
00000F00 D500D502 006E6169 03040006 0000000F 00D400D4 02006C61 6E657202 .renal..O.O.........ian..O.O.... 0001A0
00D700D7 02006369 74050400 06000000 0F00D600 D6020065 6C706F06 05000700 .....ople..O.O.........tic..X.X. 0001C0
D900D902 0074696F 03040006 0000000F 00D800D8 02007466 04030005 0000000F ........ft..O.O.........oit..U.U 0001E0
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Simon Clubley
2021-07-23 17:57:00 UTC
Permalink
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
BC00BC02 00730A02 00040000 000F00BB 00BB0200 6E6F6974 06050007 0000000F ........tion..>>.>>.........s..1/4.1/4 000000
00BE00BE 02006562 03030005 0000000F 00BD00BD 02006F02 02000400 00000F00 .........o..1/2.1/2.........be..3/4.3/4. 000020
00740902 00040000 000F00BF 00BF0200 65636E65 6373656C 0309000B 0000000F ........lescence..?.?.........t. 000040
C2020066 04020004 0000000F 00C100C1 0200730A 02000400 00000F00 C000C002 .A.A.........s..A.A.........f..A 000060
72696E03 06000800 00000F00 C300C302 00737568 70040500 07000000 0F00C200 .A.........phus..A.A.........nir 000080
70030300 05000000 0F00C500 C5020073 05020004 0000000F 00C400C4 02006D61 am..A.A.........s..A.A.........p 0000A0
69050400 06000000 0F00C700 C7020064 65050300 05000000 0F00C600 C6020074 t..AE.AE.........ed..C.C.........i 0000C0
05020004 0000000F 00C900C9 02006E6F 06030005 0000000F 00C800C8 0200676E ng..E.E.........on..E.E......... 0000E0
00070000 000F00CB 00CB0200 656C6261 72030600 08000000 0F00CA00 CA020073 s..E.E.........rable..E.E....... 000100
04000000 0F00CD00 CD020065 04020004 0000000F 00CC00CC 02006E6F 69740505 ..tion..I.I.........e..I.I...... 000120
02000400 00000F00 CF00CF02 00730502 00040000 000F00CE 00CE0200 64050200 ...d..I.I..(R).(R)....s..I.I 00012.. 000140
05050007 0000000F 00D100D1 02006465 05030005 0000000F 00D000D0 02006E04 .n..TH.TH.........ed..N.N......... 000160
06000800 00000F00 D300D302 00730502 00040000 000F00D2 00D20200 746E656D ment..O.O.........s..O.O........ 000180
00000F00 D500D502 006E6169 03040006 0000000F 00D400D4 02006C61 6E657202 .renal..O.O.........ian..O.O.... 0001A0
00D700D7 02006369 74050400 06000000 0F00D600 D6020065 6C706F06 05000700 .....ople..O.O.........tic..X.X. 0001C0
D900D902 0074696F 03040006 0000000F 00D800D8 02007466 04030005 0000000F ........ft..O.O.........oit..U.U 0001E0
Huh ? Am I missing something ?

In the above example, anything that doesn't render as a printable
character, for example, anything less than 0x20 or the things that do
render incorrectly in the above example as a printable character when
they clearly are not (such as 0xc0, which renders as an uppercase A).

I'm also assuming you are not showing a block mode display instead
of a record mode display.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
V***@SendSpamHere.ORG
2021-07-24 00:02:23 UTC
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
BC00BC02 00730A02 00040000 000F00BB 00BB0200 6E6F6974 06050007 0000000F ........tion..>>.>>.........s..1/4.1/4 000000
00BE00BE 02006562 03030005 0000000F 00BD00BD 02006F02 02000400 00000F00 .........o..1/2.1/2.........be..3/4.3/4. 000020
00740902 00040000 000F00BF 00BF0200 65636E65 6373656C 0309000B 0000000F ........lescence..?.?.........t. 000040
C2020066 04020004 0000000F 00C100C1 0200730A 02000400 00000F00 C000C002 .A.A.........s..A.A.........f..A 000060
72696E03 06000800 00000F00 C300C302 00737568 70040500 07000000 0F00C200 .A.........phus..A.A.........nir 000080
70030300 05000000 0F00C500 C5020073 05020004 0000000F 00C400C4 02006D61 am..A.A.........s..A.A.........p 0000A0
69050400 06000000 0F00C700 C7020064 65050300 05000000 0F00C600 C6020074 t..AE.AE.........ed..C.C.........i 0000C0
05020004 0000000F 00C900C9 02006E6F 06030005 0000000F 00C800C8 0200676E ng..E.E.........on..E.E......... 0000E0
00070000 000F00CB 00CB0200 656C6261 72030600 08000000 0F00CA00 CA020073 s..E.E.........rable..E.E....... 000100
04000000 0F00CD00 CD020065 04020004 0000000F 00CC00CC 02006E6F 69740505 ..tion..I.I.........e..I.I...... 000120
02000400 00000F00 CF00CF02 00730502 00040000 000F00CE 00CE0200 64050200 ...d..I.I..(R).(R)....s..I.I 00012.. 000140
05050007 0000000F 00D100D1 02006465 05030005 0000000F 00D000D0 02006E04 .n..TH.TH.........ed..N.N......... 000160
06000800 00000F00 D300D302 00730502 00040000 000F00D2 00D20200 746E656D ment..O.O.........s..O.O........ 000180
00000F00 D500D502 006E6169 03040006 0000000F 00D400D4 02006C61 6E657202 .renal..O.O.........ian..O.O.... 0001A0
00D700D7 02006369 74050400 06000000 0F00D600 D6020065 6C706F06 05000700 .....ople..O.O.........tic..X.X. 0001C0
D900D902 0074696F 03040006 0000000F 00D800D8 02007466 04030005 0000000F ........ft..O.O.........oit..U.U 0001E0
Huh ? Am I missing something ?
In the above example, anything that doesn't render as a printable
character, for example, anything less than 0x20 or the things that do
render incorrectly in the above example as a printable character when
they clearly are not (such as 0xc0, which renders as an uppercase A).
I'm also assuming you are not showing a block mode display instead
of a record mode display.
I don't care about the gobbledegook on the right and you were taking about the
display on the left. How does printing the hexadecimal from left to right as
you asked for change IN ANY WAY what is in the representation on the right?
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Simon Clubley
2021-07-24 14:48:39 UTC
Permalink
Post by V***@SendSpamHere.ORG
I don't care about the gobbledegook on the right and you were taking about the
display on the left. How does printing the hexadecimal from left to right as
you asked for change IN ANY WAY what is in the representation on the right?
Are you trolling, Brian ?

Printable characters in a file are those you can see directly without
having to resort to a dump utility to see what is in the file.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
V***@SendSpamHere.ORG
2021-07-24 22:33:19 UTC
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
I don't care about the gobbledegook on the right and you were taking about the
display on the left. How does printing the hexadecimal from left to right as
you asked for change IN ANY WAY what is in the representation on the right?
Are you trolling, Brian ?
Printable characters in a file are those you can see directly without
having to resort to a dump utility to see what is in the file.
If you can see 'em then why are you so uppity about cocking up the current
hex output?
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Simon Clubley
2021-07-26 00:17:59 UTC
Permalink
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
I don't care about the gobbledegook on the right and you were taking about the
display on the left. How does printing the hexadecimal from left to right as
you asked for change IN ANY WAY what is in the representation on the right?
Are you trolling, Brian ?
Printable characters in a file are those you can see directly without
having to resort to a dump utility to see what is in the file.
If you can see 'em then why are you so uppity about cocking up the current
hex output?
NON-printable characters, Brian, NON-printable characters. That's
what I need a dump utility to be able to see.

$ set response/mode=good_natured

You need some reading glasses Brian. Read back through the thread. :-)

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
V***@SendSpamHere.ORG
2021-07-26 11:55:43 UTC
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
I don't care about the gobbledegook on the right and you were taking about the
display on the left. How does printing the hexadecimal from left to right as
you asked for change IN ANY WAY what is in the representation on the right?
Are you trolling, Brian ?
Printable characters in a file are those you can see directly without
having to resort to a dump utility to see what is in the file.
If you can see 'em then why are you so uppity about cocking up the current
hex output?
NON-printable characters, Brian, NON-printable characters. That's
what I need a dump utility to be able to see.
$ set response/mode=good_natured
You need some reading glasses Brian. Read back through the thread. :-)
Subject: Hex display order option for DUMP ?
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Arne Vajhøj
2021-07-23 17:57:46 UTC
Permalink
Post by Simon Clubley
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
16 / 32 / 64 bit integers are also binary data.

Arne
Simon Clubley
2021-07-23 17:59:22 UTC
Permalink
Post by Arne Vajhøj
Post by Simon Clubley
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
16 / 32 / 64 bit integers are also binary data.
Which is why it would be nice to have an option to choose which
way you want the hex dump to be displayed.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
gah4
2021-07-23 17:58:28 UTC
Permalink
On Friday, July 23, 2021 at 10:09:43 AM UTC-7, Simon Clubley wrote:

(snip)
Post by Simon Clubley
Did everyone miss the part of my posting where I pointed out the
current way has advantages for little endian data but also that
it's a real pain for binary data ? :-)
Binary data can be (for example) non-printable characters in data
(which is what caused me to make this request).
Put one finger on the ASCII data, and one on the hex data.
Move one to the right as you read, the other to the left.

It is about as easy as having them both move the same direction.

There is some program that prints hex with ASCII below it, for printable
characters. But if they are side by side, it doesn't change much
either way.

On little endian machines, od -x will give bytes to you in the order

1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14

which isn't much easier to read than VMS order. It doesn't make
bytes easy, or 32 bit words (float), or larger values (double).

I can get used to any of them, but I think I get used to the VMS
ordering faster.
Simon Clubley
2021-07-23 18:08:54 UTC
Permalink
Post by gah4
On little endian machines, od -x will give bytes to you in the order
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
which isn't much easier to read than VMS order. It doesn't make
bytes easy, or 32 bit words (float), or larger values (double).
I can get used to any of them, but I think I get used to the VMS
ordering faster.
For me, the one I go to on Linux is "hexdump -C".

Of all the hexdump tools I have tried, the output from that command
is the most readable for me.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
John Reagan
2021-07-23 19:41:35 UTC
Permalink
Post by Simon Clubley
For me, the one I go to on Linux is "hexdump -C".
Of all the hexdump tools I have tried, the output from that command
is the most readable for me.
Simon.
5 years old, but seems reasonable

https://github.com/wahern/hexdump
Bill Gunshannon
2021-07-23 20:12:07 UTC
Permalink
Post by Simon Clubley
Post by gah4
On little endian machines, od -x will give bytes to you in the order
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
which isn't much easier to read than VMS order. It doesn't make
bytes easy, or 32 bit words (float), or larger values (double).
I can get used to any of them, but I think I get used to the VMS
ordering faster.
For me, the one I go to on Linux is "hexdump -C".
Of all the hexdump tools I have tried, the output from that command
is the most readable for me.
Simon.
So port it to VMS and make it your contribution to the Open Source
on VMS collections.

bill
John Reagan
2021-07-23 20:49:35 UTC
Permalink
Post by Bill Gunshannon
Post by Simon Clubley
Post by gah4
On little endian machines, od -x will give bytes to you in the order
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
which isn't much easier to read than VMS order. It doesn't make
bytes easy, or 32 bit words (float), or larger values (double).
I can get used to any of them, but I think I get used to the VMS
ordering faster.
For me, the one I go to on Linux is "hexdump -C".
Of all the hexdump tools I have tried, the output from that command
is the most readable for me.
Simon.
So port it to VMS and make it your contribution to the Open Source
on VMS collections.
bill
I downloaded the hexdump.c/hexdump.h from the github link I posted earlier

Don't bother with the silly makefile.

$ cc/noopt/debug/define=(HEXDUMP_MAIN,HAVE_ERR=0) hexdump

int luaopen_hexdump() {
^
%CC-W-MISSINGRETURN, Non-void function "luaopen_hexdump" does not contain a return statement.
at line number 1887 in file WORK20:[JREAGAN]HEXDUMP.C;2
$ link hexdump
%ILINK-W-COMPWARN, compilation warnings
module: HEXDUMP
file: WORK20:[JREAGAN]HEXDUMP.OBJ;6
$ hexdump :== $work20:[jreagan]hexdump.exe
$ hexdump "-C" login.com
00000000 24 20 66 61 63 67 65 6e 20 3a 3d 3d 20 40 78 76 |$ facgen :== @xv|
00000010 6d 73 24 73 61 6c 65 6d 5f 72 65 73 64 24 3a 5b |ms$salem_resd$:[|
00000020 62 75 69 6c 64 2e 73 79 73 62 6c 64 63 6f 6d 5d |build.sysbldcom]|
00000030 66 61 63 67 65 6e 24 21 20 54 68 65 20 6c 69 6e |facgen$! The lin|
00000040 6b 65 72 2c 20 61 6e 61 6c 79 7a 65 2c 20 6c 69 |ker, analyze, li|
00000050 62 72 61 72 2c 20 6c 62 72 2c 20 65 74 63 2e 20 |brar, lbr, etc. |
00000060 66 61 63 69 6c 69 74 69 65 73 20 61 6c 6c 20 68 |facilities all h|
00000070 61 76 65 20 61 20 73 69 6d 69 6c 61 72 24 21 20 |ave a similar$! |
00000080 73 63 68 65 6d 65 20 74 6f 20 70 61 73 73 20 69 |scheme to pass i|
00000090 6e 20 63 6f 6d 70 69 6c 65 20 61 6e 64 20 6c 69 |n compile and li|
000000a0 6e 6b 65 72 20 6f 70 74 69 6f 6e 73 2e 20 20 6c |nker options. l|
000000b0 69 62 72 61 72 2f 6c 62 72 20 69 73 20 61 20 62 |ibrar/lbr is a b|
000000c0 69 74 24 21 20 64 69 66 66 65 72 65 6e 74 20 69 |it$! different i|
000000d0 6e 20 74 68 61 74 20 69 74 20 64 6f 65 73 6e 27 |n that it doesn'|
000000e0 74 20 77 61 6e 74 20 74 68 65 20 6c 65 61 64 69 |t want the leadi|
000000f0 6e 67 20 73 6c 61 73 68 20 66 6f 72 20 74 68 65 |ng slash for the|
00000100 20 6c 69 6e 6b 65 72 24 21 20 6f 70 74 69 6f 6e | linker$! option|
Scott Dorsey
2021-07-22 23:16:36 UTC
Permalink
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
Sorry, you'll have to get a 68K for that.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Hein RMS van den Heuvel
2021-07-23 03:03:00 UTC
Permalink
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
You can't take that away, it makes us so special!

Yes, Seems like a reasonable request to me.

In the mean time, as a workaround, I offer this PERL script.


use strict;
use warnings;
my $space = q( );
while (<>) {
if (/^$space/){ # looks like actual dump data line: space at start of line?
my $len = (length > 72) ? 72 : 36; # wide or narrow dump?
my $hex = substr($_, 0, $len);
my $txt = substr($_, $len );
my $xeh;
my @hex = ($hex =~ / [ 0-9A-F]{8}/g ); # match words 8 HEX chars or spaces lead by a space.
for my $hex (reverse @hex) { # loop over each word reversing the nibbles glueing into result.
$xeh .= substr($hex,7,2) . substr($hex,5,2) . substr($hex,3,2) . substr($hex,1,2) . $space;
}
$_ = $space . $xeh . $txt; # reconstruct the line
}
print; # the line
}

Use as : perl reverse_hex_in_dump.pl input.dmp [ > output.txt ]
Enjoy,
Hein
Hein RMS van den Heuvel
2021-07-23 11:36:22 UTC
Permalink
Post by Hein RMS van den Heuvel
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
In the mean time, as a workaround, I offer this PERL script.
When I wrote the Perl script last night, I initially though I could simply use a string match for a space followed by 8 hex characters or a spaces to find the hex 'words' / [ 0-9A-F]{8}/ and with that use Perl's special powers.
However I soon realized it could over-reach into the 'text' area of dump line and needed to length or occurrence control it.
After I submitted I realized that at that point you might just as well use the length to chop the line up.
This could also easily be done in DCL, albeit not so fast.
Here is another version.
It's just silliness - but I can't rest until it's fixed. :-) :-)

use strict;
use warnings;
my $space = q( );
while (<>) { # walk the lines
if (/^$space/){ # looks like actual dump data line: space at start of line?
my $len = (length > 72) ? 72 : 36; # wide or narrow dump?
my $txt = substr($_, $len );
my ($hex, $xeh);
while ($len) {
$len -= 9;
$hex = substr ($_, $len, 9); # grab the space and next 8 characters
$xeh .= $space . substr($hex,7,2) . substr($hex,5,2) . substr($hex,3,2) . substr($hex,1,2);
}
$_ = $xeh . $txt; # reconstruct the line
}
print $_; # print the (result) line
}
Post by Hein RMS van den Heuvel
Use as : perl reverse_hex_in_dump.pl input.dmp [ > output.txt ]
Enjoy,
Hein
Simon Clubley
2021-07-23 17:13:07 UTC
Permalink
Post by Hein RMS van den Heuvel
It's just silliness - but I can't rest until it's fixed. :-) :-)
That's what makes us invent things. :-)

We see something that annoys us and then we develop a way to fix it. :-)

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Phil Howell
2021-07-23 03:19:33 UTC
Permalink
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
By all means leave the default as it currently is, but VMS DUMP output
is hard to read when you are used to how all other dump programs
I have used do it.
Right to left might make some sense for looking at numeric values
when you are used to it, but it's a real pain when looking at pure
binary data.
I've looked at the online help for the latest VSI Alpha VMS version
and don't see any option for this.
Thanks,
Simon.
--
Walking destinations on a map are further away than they appear.
WordPerfect 5.1 for VMS could do that. :)
Simon Clubley
2021-07-23 17:18:07 UTC
Permalink
Post by Phil Howell
WordPerfect 5.1 for VMS could do that. :)
Interesting. I didn't know that.

I do wish modern word processors had WordPerfect's Reveal Codes
functionality where you could not only see the formatting codes
but actually directly edit them as well.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2021-07-23 17:58:55 UTC
Permalink
Post by Simon Clubley
I do wish modern word processors had WordPerfect's Reveal Codes
functionality where you could not only see the formatting codes
but actually directly edit them as well.
Both ODF and OOXML are XML based so in theory you can see and edit just
fine with your favorite editor.

In practice it may be a bit too cumbersome.

:-)

Arne
Lawrence D’Oliveiro
2021-08-12 04:27:35 UTC
Permalink
Post by Simon Clubley
I do wish modern word processors had WordPerfect's Reveal Codes
functionality where you could not only see the formatting codes
but actually directly edit them as well.
I hear this all the time from former WordPerfect users.

No other word processor offers that function because no other word processor uses embedded formatting codes. They have proper in-memory data structures for encoding style runs and attaching attributes to text.

I can remember, in my brief bouts with WordPerfect, encountering such amusing little peccadilloes like somehow managing to delete the “end-bold” code at the end of a stretch of bolded text while leaving the “begin-bold” code intact, whereupon the entire rest of the document turned to bold text ...
Arne Vajhøj
2021-08-12 14:29:47 UTC
Permalink
On Saturday, July 24, 2021 at 5:18:10 AM UTC+12, Simon Clubley
Post by Simon Clubley
I do wish modern word processors had WordPerfect's Reveal Codes
functionality where you could not only see the formatting codes but
actually directly edit them as well.
I hear this all the time from former WordPerfect users.
No other word processor offers that function because no other word
processor uses embedded formatting codes. They have proper in-memory
data structures for encoding style runs and attaching attributes to
text.
At the lowest level both OOXML and ODF use start and end tags.

Arne

gah4
2021-07-23 12:07:46 UTC
Permalink
Post by Simon Clubley
Can we please have an option in DUMP to display the hex values from
left to right (instead of from right to left), just like every other
hex dump program I have used does ?
By all means leave the default as it currently is, but VMS DUMP output
is hard to read when you are used to how all other dump programs
I have used do it.
Right to left might make some sense for looking at numeric values
when you are used to it, but it's a real pain when looking at pure
binary data.
The disadvantage of little endian machines. At least the bytes are in the
right order. Consider Unix od -x, which prints 16 bit words, left to right, but
the bytes in each word are the wrong order.

It is, to me, much easier to read the whole byte sequence backwords,
instead of just each word. Well, actually, I can almost read text backwards,
but that is a different question.

Boycott little-endian machines, until the problem goes away.
Loading...