Re: MASM dwords as character strings




Bob Masta wrote:
OK, this is a trivial problem but one that has
bugged me for a while. There are many times
when I want to compare a dword with a 4-char string.
Let's say the string is 'RIFF' and I want to know if
EAX matches. Under MASM, I have to write
cmp eax.'FFIR'
to get the proper byte order. Is there some
way to tell it to reverse the byte order of string immediates,
so I can write them naturally and make the code
much easier to read?

Many thanks!

I've generally written a macro for this purpose, but if there is a way
to do it directly I'd be interested in knowing, too.
Cheers,
Randy Hyde

.



Relevant Pages

  • Re: 32-bit programs on Windows x64
    ... tiny individual sequences. ... to compare its input string against every possible ... compare one string against one string, ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... THE AMOUNT OF RAM ON THE MACHINE IS COMPLETELY, ... nothing in that article that implies any concurrency. ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... machine has "parallelism" ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... THE AMOUNT OF RAM ON THE MACHINE IS COMPLETELY, ... nothing in that article that implies any concurrency. ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... THE AMOUNT OF RAM ON THE MACHINE IS COMPLETELY, ... to compare its input string against every possible valid ... Note that the L2 cache is ...
    (microsoft.public.vc.mfc)