Re: newbie: MUL product
- From: "Wolfgang Kern" <nowhere@xxxxxxxx>
- Date: Fri, 30 Mar 2007 13:51:16 +0200
Brian asked:
[...]
Is little endian storage done on a byte by byte basis, a word by word
basis, or dword by dword?
Byte by byte.
If I understood the comment above correctly, you indicated that
writing ax to memory will write al then ah. Then, writing dx to the
same memory address (+ 2), will write dl, then dh. So that makes me
think that endian order is a byte by byte basis in memory, but all I
have to be concerned about is writing the low "register" first and the
high "register" last.... the processor will flip the bytes in the
individual registers automatically. Sound right?
Yes. Except there is no need to flip it
(the BUS and CPU architecur is designed that way).
x86 CPUs store data in an address powered order (little Endian)
[low byte at low address ...]
So you end up with:
xx00 al
xx01 ah
xx02 dl
xx03 dh
and can then read it with
MOV edx,[xx00]
JFYI: (not to add confusion yet)
A different story are "bits" in standard text-fonts
here the top-left dot is at bit 7 rather than at bit 0.
Perhaps this is just because stolen from Big Endian MAC :)
__
wolfgang
.
- References:
- newbie: MUL product
- From: Brian
- Re: newbie: MUL product
- From: Wolfgang Kern
- Re: newbie: MUL product
- From: Herbert Kleebauer
- Re: newbie: MUL product
- From: Brian
- Re: newbie: MUL product
- From: Frank Kotler
- Re: newbie: MUL product
- From: Brian
- newbie: MUL product
- Prev by Date: Re: cFASM (calling FASM as a C function)
- Next by Date: Re: newbie: MUL product
- Previous by thread: Re: newbie: MUL product
- Next by thread: Re: newbie: MUL product
- Index(es):
Relevant Pages
|