Newbie needing help here :)
What is the reason you can't do
mov eax,FFFFFFFFh directly without using mov eax,0FFFFFFFFh
I notice you can do up til mov eax,9FFFFFFFh but anything from mov eax,A0FFFFFFh onward will give you an "undefined symbol" error unless you put a 0 in front. What is the exact reason?
Posted on 2004-11-06 23:38:40 by Randomizer
The assembler thinks that it is a label.
Posted on 2004-11-07 02:37:03 by roticv
The assembler thinks that it is a label.


So you can't start off as any value from A to F ? For instance ABCDh needs to be 0ABCDh?

Just a question though, won't that be messed up by the little endian ordering when the intel processor intepretes it. Say mov eax,0FFEEDDCCh will be stored as
CCh
DDh
EEh
FFh
00h

= CCDDEEFF0h making it a different value altogether with the 0 behind ?
Posted on 2004-11-07 03:45:11 by Randomizer


So you can't start off as any value from A to F ? For instance ABCDh needs to be 0ABCDh?

Just a question though, won't that be messed up by the little endian ordering when the intel processor intepretes it. Say mov eax,0FFEEDDCCh will be stored as
CCh
DDh
EEh
FFh
00h

= CCDDEEFF0h making it a different value altogether with the 0 behind ?

Yes.

No.
Posted on 2004-11-07 05:28:41 by roticv


So you can't start off as any value from A to F ? For instance ABCDh needs to be 0ABCDh?

Just a question though, won't that be messed up by the little endian ordering when the intel processor intepretes it. Say mov eax,0FFEEDDCCh will be stored as
CCh
DDh
EEh
FFh
00h

= CCDDEEFF0h making it a different value altogether with the 0 behind ?

Yes.

No.


Thanks for the detailed replies :wink:
But by no, do you mean that CCDDEEFF00h is the same as CCDDEEFFh or that this is not how little endian ordering is? I don't get it.
Posted on 2004-11-10 08:18:11 by Randomizer
The processor assumes little endian and calculates values accordingly. Some people are accustom to reading from left to right and they don't always understand things accordingly.

0FFFFFFFFh is the same as -1 in 32-bit binary numbers.
Posted on 2004-11-10 11:33:32 by bitRAKE
Because the 0 in front is insignificant, it is not necessary to encode it for a value that fits in 32-bits. Also, note that short positive numbers are "padded" on the "left" with zeroes to fit them into 32-bits.

Registers do not have byte addresses, so the notion of little-endian and big-endian is not used when referring to registers. The register is treated as a single 32-bit unit, which can be partitioned into bit fields. Some of the fields are given register names by Intel.

When the 32-bit data in the register is broken into bytes for storage (in memory) or data communications (e.g., a COM port), that is where little-endian and big-endian become meaningful. It is the addressing order of the bytes in memory, or the order in which the bytes are sent to the data communications port.
Posted on 2004-11-10 17:25:00 by tenkey
Thanks for all the help guys.
Posted on 2004-11-14 02:44:18 by Randomizer