%i\n" .m2: .string "Vendor ID: %s\n" .globl main main: push r12 mov eax, 1 sub rsp, 16 cpuid lea rdi, .m0[rip] mov esi, eax call printf mov eax, 0 cpuid lea rdi, .m1[rip] mov esi, eax mov r12d, edx mov ebp, ecx call printf mov 3[rsp], ebx lea rsi, 3[rsp] lea rdi, .m2[rip] mov 7[rsp], r12d mov 11[rsp], ebp call printf add rsp, 16 pop r12 ret .section .note.GNU-stack,"",@progbits EAX=1: Processor Info and Feature Bits This returns the CPU's stepping, model, and family information in register EAX (also called the signature of a CPU), feature flags in registers EDX and ECX, and additional feature info in register EBX. Stepping ID is a product revision number assigned due to fixed errata or other changes. The actual processor model is derived from the Model, Extended Model ID and Family ID fields. If the Family ID field is either 6 or 15, the model is equal to the sum of the Extended Model ID field shifted left by 4 bits and the Model field. Otherwise, the model is equal to the value of the Model field. The actual processor family is derived from the Family ID and Extended Family ID fields. If the Family ID field is equal to 15, the family is equal to the sum of the Extended Family ID and the Family ID fields. Otherwise, the family is equal to the value of the Family ID field. The meaning of the Processor Type field is given in the table below. The processor info and feature flags are manufacturer specific but usually, the Intel values are used by other manufacturers for the sake of compatibility. Reserved fields should be masked before using them for processor identification purposes. EAX=2: Cache and TLB Descriptor information This returns a list of descriptors indicating cache and TLB capabilities in EAX, EBX, ECX and EDX registers. EAX=3: Processor Serial Number This returns the processor's serial number. The processor serial number was introduced on Intel Pentium III, but due to privacy concerns, this feature is no longer implemented on later models (the PSN feature bit is always cleared). Transmeta's Efficeon and Crusoe processors also provide this feature. AMD CPUs however, do not implement this feature in any CPU models. For Intel Pentium III CPUs, the serial number is returned in the EDX:ECX registers. For Transmeta Efficeon CPUs, it is returned in the EBX:EAX registers. And for Transmeta