MASM dwords as character strings



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!


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator

.



Relevant Pages

  • Re: MASM dwords as character strings
    ... Bob Masta wrote: ... when I want to compare a dword with a 4-char string. ...
    (comp.lang.asm.x86)
  • Problem converting string to bin/dec/hex
    ... This will require DWORD ... SetConsoleMode PROTO NEAR32 stdcall, ... OutputStr1 BYTE LF,CR,'Input string was: ... lea esi, InputAsStr ...
    (comp.lang.asm.x86)
  • 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
    ... 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)