Graeme, Sorry, but I just have to do this. X86 registers work in trinary mode rather than binary? Your map of the eax register shows.
eax: 00000000 00000000 00000001 00000020 <====== What's the 00000020 mean? :-) Rex -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Graeme Gibson Sent: Monday, April 11, 2011 11:42 PM To: [email protected] Subject: Re: New job for mainframes: Cloud platform Well, let's not skew the kiddie's brains too much.. "Endian- ness", in the context used in these posts, refers to BYTE order not BIT order. The bit-order *within each byte* is still "most significant on the left" in both big- and little- endian systems. Another wrinkle: In the x86 world (little-endian) Intel "names" the bits within a byte, from the left, 7,6,5,4,3,2,1,0 whereas in the z.. world (big-endian) IBM "names" them 0,1,2,3,4,5,6,7. Regardless of the naming scheme used, the "rightmost" bit in each byte is the least-significant. :-) An x86 code fragment might help to illustrate: .code mov eax,258 ;let's start with 258 KG mov weight,eax .. .. ret .data weight dd 0 ;weight in kilograms After that 2nd mov instruction, while the 32-bit eax register looks like: bits 32,31,..,24 | bits 23,22,..,16 | | bits 15,14,..,8 | | | bits 7,6,5,..,0 | | | | eax: 00000000 00000000 00000001 00000020 ..the four bytes at label "weight" will look like: weight 00000010 00000001 00000000 00000000 | | | | | | | bits 32,31,..,24 | | bits 23,22,..,16 | bits 15,14,..,8 bits 7,6,5,..,0 So, bit numbering aside, it still looks like a big-endian world once you're "inside" the processor. Cheers, Graeme The information contained in this e-mail may contain confidential and/or privileged information and is intended for the sole use of the intended recipient. If you are not the intended recipient, you are hereby notified that any unauthorized use, disclosure, distribution or copying of this communication is strictly prohibited. If you received this e-mail in error, please reply to sender and destroy or delete the message and any attachments. Thank you. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

