I think there is a little misunderstanding here. Let me try to explain what I mean.
You originally posted:
Code: Select all 
   mov edx, 0x0534D4150 ; Place "SMAP" into edx
With the question:
 Since x86 is little endian, wouldn't the magic value be "PAMS", not "SMAP"?
A comment or documentation stating to placing "SMAP" (which is short for "System Map", if memory serves) into 'edx' relies 100% on endianness of the assembler. That same comment or documentation stating to place 0x534D4150 into 'edx' only relies on the endianness of the architecture and not the assembler. I believe we both agree on this statement.
Many documents will state to place a string literal into a register or memory operand giving the human readable format of, for this example, "SMAP". Then, hopefully, explain that the 'P' is the low-byte and the 'S' is the high byte (or the other way around), but some do not, unfortunately.
What I think is the confusion is with the following assembly line:
Code: Select all 
   mov edx,"SMAP" ; Place "SMAP" into edx
With your question in mind, the above line 100% relies upon the function of the assembler translating "SMAP" to 0x534D4150 or 0x50414D53.
If the assembler translates "SMAP" to 0x50414D53, in my opinion, this is considered a big-endian translation. When written to memory the 'S' is stored first.
If the assembler translates "SMAP" to 0x534D4150, in my opinion, this is considered a little-endian translation. When written to memory the 'P' is stored first.
(Remembering that we are discussing the target to be a little-endian architecture)
Therefore, look at the following code: (no specific assembler stated)
Code: Select all 
 mov eax,[some_offset_where_we_read_the_SMAP_value]
 cmp eax,"SMAP"
 
Since Intel is a little-endian machine, the above statement may fail. However,
Code: Select all 
 mov eax,[some_offset_where_we_read_the_SMAP_value]
 cmp eax,"PAMS"
 
May not fail.
The question comes as, does the author prefer the first or the second block of code?
So, to get back to the original question, please note that you did 
not ask:
 Since x86 is little endian, wouldn't the magic value be 0x534D4150, not 0x50414D53?
You asked about the string literal's endianness, not the value's endianness.
Therefore, my comment was/is, if you use the string literal instead of the number, make sure the assembler knows which endianness you desire.
In my assembler, the following two lines produce two separate machine code instructions:
Code: Select all 
   mov edx,'SMAP' ; Place 0x534D4150 into edx
   mov edx,"SMAP" ; Place 0x50414D53 into edx
Therefore, I would prefer to use:
Instead of:
Since the documentation states to use "SMAP" as a string literal *and* it is easier to read the first block instead of the second block.
Where this really comes into play is when you are on a little-endian machine, using a little-endian assembler, trying to read from a memory block that uses big-endian values, such as some of the descriptors in CD-ROMs. So the following code can be used to read the little-endian values and big-endian values using the same string literal:
Code: Select all 
   cmp dword ptr [ebx+123], 'SMAP' ; does the little-endian signature match what we want?
   cmp dword ptr [ebx+123], "SMAP" ; does the big-endian signature match what we want?
Therefore, depending on the assembler you use, make sure that if you use:
Code: Select all 
   mov edx,"SMAP" ; Place "SMAP" into edx
the assembler uses the correct endianness, which in this case is 100% the endianness of the assembler.
So when I state, check the endianness of the assembler, I mean, how does the assembler translate "SMAP" in to a dword value.
Does this make sense now? I am sorry for the confusion.
Ben
P.S. This is not assembler specific. This same issue can be found in compilers as well. 
https://learn.microsoft.com/en-us/cpp/c ... w=msvc-170. When using literals in this way, it is good to make sure you understand what the compiler will translate the following into:
Code: Select all 
 auto m0 = 'abcd'; // int, value 0x61626364