The "Go" tools
The GoAsm manual
by Jeremy Gordon -
This file is intended for those interested in 32 bit assembler programming, in particular for Windows.
This is a topic you will need to know about if you intend to examine the data and memory or your computer using a debugger. If not, then this article will be of interest only.
Basically Intel processors do not keep data in memory in the order you
would expect. Instead the data is reverse stored on a byte by byte
When the memory at 400000h is read into a word register by a word instruction, the bytes will be read in reverse so that the value 248Ch will be loaded into the register.
For example suppose you have a dword of value 12345678h to be stored at
400000h. This will be stored as follows:-
When the memory at 400000h is read into a dword register by a dword instruction, the bytes will be read in reverse so that the value 12345678h will be loaded into the register.
Note that the nibbles in the byte are not reversed at any time.
By now you may be asking why this happens. Wouldn't it be much easier to store data in the same order as we visualise it? Well it would be for us, but not for the computer. And this is not something that you can blame on assembler language. All data whatever language is used is stored in this way on Intel processors. Normally this is something transparent to the programmer and you needn't worry about it.
Copyright © Jeremy Gordon 2002-2003
Back to top