I know big endian in 32 bit is 4321. Is little endian 3412? Im doing some graphic stuff, so now I actually need to care about the bytes. Cant treat everything like a 32-bit int anymore.
Posted on 2001-05-10 17:44:00 by asm_happy
It doesnt matter how internaly in memory data is stored, when you do something with it, it is loaded into register and there everything is on the right place.
Posted on 2001-05-10 18:02:00 by Geecko
While this is true, I dont agree on dismissing the need to understand this. To answer your question its best illustrated by example (I only blabber otherwise ;) )

     mov eax, '1234'
     mov DATA, eax
     lea eax, DATA
     mov ecx, 0
     mov ch, 
     DPrintValH ecx, ">"
     mov ch, 
     DPrintValH ecx, ">"
     mov ch, 
     DPrintValH ecx, ">"
     mov ch, 
     DPrintValH ecx, ">"
BTW: DPrintValH is a macro Ernie has on is web site for debugging. The output is: >: 00003400H >: 00003300H >: 00003200H >: 00003100H So, WRITE to memory eax =(ABCD) will store memory as (DCBA). And, READ from memory (ABCD) will have eax == (DCBA) in its register. Hope this helps. NaN
Posted on 2001-05-10 18:31:00 by NaN
Just what I thought. The registers ARE backwards from memory. Or is it the other way around?:)
Posted on 2001-05-10 20:20:00 by asm_happy
It's not the registers that are backwards. Registers always hold bits in the correct order. It's the memory that's backwards, and in the case of byte-addressable machines like the x86, it's per byte. And, furthermore, it's backwards only from the viewpoint of a typical memory dump.
Posted on 2001-05-11 14:41:00 by tank