Xref: utzoo comp.arch:7875 comp.misc:4723 comp.lang.misc:2547 comp.protocols.misc:452 Path: utzoo!attcan!uunet!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.arch,comp.misc,comp.lang.misc,comp.protocols.misc Subject: Re: "big endian" and "little endian" - first usage for computer Keywords: dump little-endian strings Message-ID: <5703@cbmvax.UUCP> Date: 17 Jan 89 00:40:23 GMT References: <170@microsoft.UUCP> <4008@hubcap.UUCP> <482@babbage.acc.virginia.edu> <5658@cbmvax.UUCP> <1433@trantor.harris-atd.com> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 39 In article <1433@trantor.harris-atd.com> bbadger@x102c.UUCP (Badger BA 64810) writes: >In article <5658@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: >>2) Hardware people like to draw diagrams with 0 at bottom-right, software >>people, used to printers and screens that print top to bottom, left to right, >>like to put 0 at upper-left. It also makes dumping memory with strings easier >>to read. >DEC VAX DUMP prints out in a format that makes both integers and strings >easy to read. Namely, it prints out each in their ``natural'' order: >Integers in little-endian (right to left), and strings from left to right. > 4E4D4C4B 4A494847 46454443 4241002F /.ABCDEFGHIJKLMN 000000 > 69685420 5A595857 56555453 5251504F OPQRSTUVWXYZ Thi 000010 > 74736574 20612079 6C6E6F20 73692073 s is only a test 000020 > <----- numbers go this way <---*---> strings go this way ---> > >People who expect the first word (000000) to appear first (at left) will be >suprised by this, but it's perfectly consistent with the way we write >our numbers and strings. I don't know about you (or your hardware), but I tend to write from left to right, not right to left. :-) And I don't start writing in the middle of the page, and go both left and right from there. :-) Sure you can write this way, or even make things scroll up, but most terminals/whatever are easier to deal with in a sequential, left to right, top to bottom fashion. It's marginally more annoying to deal with in your way. Also, I get a headache trying to find the word/byte/whatever I'm looking for in a listing like that, I have to reverse my thinking. :-) Personally, that's a nice kludge to get around the fact that little- endian is "naturally" written right to left, bottom to top by most people. However, people don't read that way, certainly not text. I think little-endian is a long-standing joke played by hardware engineers of software writers. :-) -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup