S
S
sddvxd2019-05-08 19:28:35
assembler
sddvxd, 2019-05-08 19:28:35

What address will 1 be written to?

Good afternoon
byteorder.png
Judging by this image, if I try to do this:
mov dword [block], 1
And on my computer there will be a processor with a little-endian processor, then it turns out that if I try to read 4 bytes at block address, I will not get one, as I expected, but 16777216? After all, the addresses grow downward, or is the unit still written to the low byte, that is, at the address block + 3?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sddvxd, 2019-05-08
@sddvxd

I seem to understand a little, please correct me if it's wrong - If I had a computer with big-endian, then the unit would be written at the address block + 3, not as I would point to mov dword [block], 1, namely at the address block + 3. In little endian recorded exactly as I would have indicated. Apparently, for this, there is a requirement to clarify the size of the operand of the memory type, because the byte order is different

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question