- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ??
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 ??
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page