SourcePoint AMD Help

Table of Contents

cpuid_ebx

Execute the CPUID assembly instruction and return the value in EBX.

Syntax:

[result =] [[px]] cpuid_ebx [(eax[,ecx])]

Where:

[px]

is the viewpoint override, including punctuation ( [ ] ), specifying that the viewpoint is temporarily set to processor x of the boundary scan chain.  The processor can be specified as px (where x is the processor ID), or an alias you have defined for a given processor ID.  ALL cannot be used as a viewpoint override.

eax

is the value to be stored in EAX before the CPUID instruction is executed. If no value is specified, 1 is used by default.

ecx

is the value to be stored in ECX before the CPUID instruction is executed. If no value is specified, 0 is used by default.

result

is an ord4 variable to receive the value of EBX.

Discussion

Execute the CPUID instruction with the specified values of EAX and ECX.  The return value (EBX) can be assigned to a debug variable, or displayed on the command line.

Example 1

To run cpuid_ebx on the viewpoint processor with EAX=1 and display the value obtained in EBX:

Command input:

cpuid_ebx

Result:

04100800H

Example 2

To run cpuid_ebx on the viewpoint processor with EAX=10 and display the value obtained in EBX:

Command input:

cpuid_ebx(10)

Result:

00000002H

Example 3

To run cpuid_ebx on the viewpoint processor with EAX=10 and ECX=5 and store the result obtained in EBX to a variable:

Command input:

define ord4 o4cpuidebx = cpuid_ebx(10,5)

04cpuidebx

Result:

00000000

Related Topics