News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

error in MOV

Started by lelejau, December 22, 2010, 07:13:23 PM

Previous topic - Next topic

lelejau

I'm trying to do this MOV:

MOV EDX,DWORD PTR SS:[ESP+B8]

But, I'm getting this error:

undefined symbol B8

:( Why is that?

Do not treat this forum like a paid help desk with the [SOLVED] in the topic line.
Learning assembly :)

qWord

hi,

numeric constants must begin with an numeric digit (0-9). Hexadecimal numbers also requite the 'h' suffix:
QuoteMOV EDX,DWORD PTR SS:[ESP+0B8h]

qWord
FPU in a trice: SmplMath
It's that simple!

lelejau

Learning assembly :)

dedndave

        MOV     EDX,[ESP+0B8h]

dword ptr is not needed, as EDX is a dword sized register
size need not be specified when the destination and/or target is a register, except with MOVZX or MOVSX

SS: segment override is also not needed, as addressing with ESP references the SS selector by default

clive

Quote from: dedndave
SS: segment override is also not needed, as addressing with ESP references the SS selector by default

This is also the case for EBP, if used as the base register.

mov edx,[ebx + ebp*1 + 0xB8h] ; would use the DS selector
mov edx,[ebp + ebx*1 + 0xB8h] ; would use the SS selector
It could be a random act of randomness. Those happen a lot as well.

lelejau

Quote from: lelejau on December 22, 2010, 07:13:23 PM
Do not treat this forum like a paid help desk with the [SOLVED] in the topic line.
Sorry hutch.  :U
Learning assembly :)