Click here to Skip to main content
15,913,111 members

Comments by RickyMa Wiskerlian (Top 21 by date)

RickyMa Wiskerlian 1-Aug-16 3:07am View    
Sorry for late reply because of a vacatino. It can be excuted but it does not give me the exact result which I need is an unique id of the cpuid.
RickyMa Wiskerlian 20-Jul-16 21:50pm View    
I am using Visual Studio Express 2012
RickyMa Wiskerlian 20-Jul-16 5:36am View    
I still cannot run, is there any version of c++
RickyMa Wiskerlian 19-Jul-16 3:14am View    
is it correct? again I just include iostream and string.h
RickyMa Wiskerlian 19-Jul-16 3:14am View    
#include <iostream>
#include <string.h>
using namespace std;

static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
{
/* ecx is often an input as well as an output. */
asm volatile("cpuid": "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx): "0" (*eax), "2" (*ecx): "memory");
}

int main()
{
return 0;
}