Community
cancel
Showing results for 
Search instead for 
Did you mean: 
slider77
Beginner
87 Views

movd instruction not working with Masm 8.0

I am currently using Masm 8.0 which is giving the error message "Invalid instruction operand" with
the movd [edi+eax],MM0 instruction. The code worked fine with Masm 6.14.

The comment next to the 3rd instruction explains what is happening.

Thanks.

packuswb MM1,MM7
packuswb MM2,MM7

movd [edi+eax],MM0 ; If this is changed to movq [edi+eax], MM0 , then
; Masm 8.0 no longer complains, but the video mode is changed
; to a lower resolution ??

0 Kudos
2 Replies
mazegen
Beginner
87 Views

Seems like a serious bug in MASM 8.0 and 9.0. Add the following macro to your source code to workaround the problem:

movdfix MACRO op1, op2
LOCAL loc1, loc2
loc1 = $+1
movq op1, op2
loc2 = $
ORG loc1
DB 7Eh ;; create MOVD
ORG loc2
ENDM

And use it like this:

movdfix [edx+eax],mm0
Ogilvie__Duncan
Beginner
87 Views

Sorry for digging up this ancient thread from the grave but I recently had the same issue with MASM in Visual Studio 2013.

Just write: movd dword ptr [edi+eax],mm0

Reply