using asm function

Can we use asm embededd in C/C++ code.
I wanted to find the execution time of my process.

we can use rtdsc assembly instruction to find the execution time of the
process.

Using pragma is one method, another what i just learnt is that we can use
_asm() function. But could not succedd in using it.

Can anybody suggest me a method to execute this instruction?

Thanks,
Radha

“radha krishnan” <radha.nk@geind.ge.com> wrote in message
news:dm6vn6$aqo$1@inn.qnx.com

Can we use asm embededd in C/C++ code.
I wanted to find the execution time of my process.

we can use rtdsc assembly instruction to find the execution time of the
process.

Using pragma is one method, another what i just learnt is that we can use
_asm() function. But could not succedd in using it.

typedef struct {
unsigned long low, high;
} int64_t;

void rdtsc64( int64_t *ptr );

#pragma aux rdtsc64 = “db 0fh,31h” “mov [ebx],eax” “mov [ebx+4],edx”
parm nomemory [ebx] modify exact nomemory [eax edx];

Can anybody suggest me a method to execute this instruction?

Thanks,
Radha