Advertisement

01.25.2008 at 03:10AM PST, ID: 23110665 | Points: 500
[x]
Attachment Details

How to write following asm for Linux rhel4

Asked by askquestion_expert in Linux Programming, C Programming Language, Open Source Programming

Tags: ,

Hi,
The following code works for Win32bit platfomr properly, how can i port the same code on Linux platfrom,
using c or c++ language only, can someone point out how to port the following code to linux platfrom.

#define INITIAL_APIC_ID_BITS 0xFF000000 // EBX[31:24] unique APIC ID    

int get_APICID()
{
     int nAPICPhysicalID = 0;
    unsigned    nIds;
    unsigned int reg_ebx = 0;
       __asm
       {
             mov   eax, 1
             cpuid
             mov  reg_ebx, ebx
       }
       nAPICPhysicalID = ((reg_ebx & INITIAL_APIC_ID_BITS) >> 24);

   return nAPICPhysicalID ;
}

Thanks in advance,
Start Free Trial
 
 
[+][-]01.25.2008 at 03:47AM PST, ID: 20741653

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 04:28AM PST, ID: 20741841

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 04:33AM PST, ID: 20741854

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 05:28AM PST, ID: 20742240

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 06:09AM PST, ID: 20742560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 06:13AM PST, ID: 20742593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 06:42AM PST, ID: 20742853

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 06:57AM PST, ID: 20742972

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 06:57AM PST, ID: 20742975

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 12:15PM PST, ID: 20745939

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 02:58PM PST, ID: 20747117

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.28.2008 at 05:33AM PST, ID: 20758689

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.28.2008 at 05:36AM PST, ID: 20758708

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.28.2008 at 06:04AM PST, ID: 20758914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.30.2008 at 04:07AM PST, ID: 20776304

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.02.2008 at 09:14AM PST, ID: 20805023

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.02.2008 at 06:16PM PST, ID: 20807092

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628