How can I use the MMX opcodes in MASM32? Whenever I try to use one, masm tells me I can't use these with the selected processor. I'm using the .386 directive, but I've also tried .586 and even .686, but nothing worked. What is the correct directive for MMX processors? I couldn't find this in the doc. Please help me, I need this stuff to work! Many thanks in advance, Clemens Hofreither This message was edited by Hiroshimator, on 3/20/2001 2:31:59 PM
Posted on 2001-03-20 13:04:00 by Clemens Hofreither
Are you placing '.mmx' at the beginning of your code? That should do it.
Posted on 2001-03-20 13:57:00 by ChrisH
Ya im kinda currious about MMX as well, i know of some commands and how to use them, but i never came across how to check and see if a CPU is MMX compatable. Is this a simple proceedure?? NaN
Posted on 2001-03-20 15:14:00 by NaN
one of the original (the second) visual assembler project had a default project which did exactly that with NASM... check to see if the processor was MMX compatible. I don't have it here at work but I have it at home... I can send you the source to do that if you need later tonight... I'll post it here unless someone else does first. _Shawn
Posted on 2001-03-20 15:32:00 by _Shawn
The technical data for the original question is contained in the readme.txt file for the MASM 6.14 patch. As ChrisH pointed out, adding .MMX tells the assembler to use MMX instructions.

MMX instructions,

3DNow instructions

SIMD instructions
Posted on 2001-03-20 15:45:00 by hutch--
Shawn, Yes, i would be interested, if you could post that it would be great. Or e-mail me is you wish... NaN This message was edited by NaN, on 3/20/2001 10:38:40 PM
Posted on 2001-03-20 21:38:00 by NaN
Okay, I have the source for checking if your CPU supports MMX or not. I forgot who the credits go to, but they are listed in the file with his email. It requires a large MMX include which has many macros for dealing with it... also, I checked Intels site today about identifying the CPU and what it supports and this source actual puts it to very good use, tho Intel didn't have sample source... MMX.ZIP Questions? Ask Thanks, _Shawn This message was edited by Shawn Bullock, on 3/20/2001 11:12:58 PM
Posted on 2001-03-20 22:10:00 by _Shawn
heres how to detect if a cpu surports mmx:

mov eax,1 ;Set eax to the index of the information we want to look up
cpuid     ;Execute the cpuid instruction
.IF (edx & 23) ;EDX contains heaps of info. Bit 23 is MMX bit.
    ;MMX is surported
    ;MMX not surported
If you want to know how this all works, because this method can tell you much more info about the current PC, lookup the CPUID instruction in Intels Opcode document (My version is 24319101.pdf). This message was edited by George, on 3/21/2001 12:57:41 AM
Posted on 2001-03-20 23:56:00 by George
Thank you very much, this is quite handy information to have.. :) NaN
Posted on 2001-03-21 00:07:00 by NaN
Thanks, I also got it to work now! I've already written a very nice little benchmarking program to compare normal bytewise operations to MMX ops using RDTSC...
Posted on 2001-03-21 14:14:00 by Clemens Hofreither