MMX Áö¿ø¿©ºÎÀÇ È®ÀÎ
´ÙÀ½Àº »ç¿ëÀÚÀÇ ÄÄÇ»ÅÍ cpu°¡ mmx¸¦ Áö¿øÇÏ´Â Áö ¾Ë¾Æº¸´Â ·çƾÀÔ´Ï´Ù.
#include "mmx_detect.h"
#include "stdio.h"
//
¸®ÅϰªÀÌ 1 À̸é MMX Áö¿ø, 0 À̸é Áö¿øÇÏÁö ¾Ê´Â °ÍÀÌ´Ù.
int detect_mmx(void)
{
int
res, mmx;
_asm {
mov
eax, 1;
cpuid;
mov
res, edx;
}
mmx
= (res & 0x00800000) ? 1 : 0;
return
mmx;
}
void main()
{
int
Detected;
Detected
= detect_mmx();
if(Detected)
printf("MMX
is Supported.\n");
else
printf("MMX
is NOT Supported\n");
}
- the end of this article -