GNU Info

Info Node: (nasm.info)Section 3.4.2

(nasm.info)Section 3.4.2


Next: Section 3.4.3 Prev: Section 3.4.1 Up: Section 3.4
Enter node , (file) or (file)node

3.4.2. Character Constants
--------------------------

   A character constant consists of up to four characters enclosed in
either single or double quotes. The type of quote makes no difference
to NASM, except of course that surrounding the constant with single
quotes allows double quotes to appear within it and vice versa.

   A character constant with more than one character will be arranged
with little-endian order in mind: if you code

               mov eax,'abcd'

   then the constant generated is not `0x61626364', but `0x64636261',
so that if you were then to store the value into memory, it would read
`abcd' rather than `dcba'. This is also the sense of character
constants understood by the Pentium's `CPUID' instruction (see *Note
Section B.4.34::).


automatically generated by info2www version 1.2.2.9