https://en.wikipedia.org/wiki/CPUIDThis seems to confirm my recollection that we got all paranoid about the serial number, and that it was generally not available. If it is, eax = 3 - number in edx:ecx, ebx:eax, or ebx only... if it's enabled in BIOS.
Here's a cpuid I've got handy...
; nasm -f elf32 cpuname.asm
; ld -o cpuname cpuname.o -m elf_i386
global _start
section .bss
namestring resb 49
section .text
_start:
mov eax, 80000000h
cpuid
cmp eax, 80000004h
jb exit
mov edi, namestring
mov eax, 80000002h
cpuid
call savestring
mov eax, 80000003h
cpuid
call savestring
mov eax, 80000004h
cpuid
call savestring
mov al, 10
stosb
mov ecx, namestring
mov edx, 49
mov ebx, 1
mov eax, 4
int 80h
exit:
mov eax, 1
int 80h
;----------------
;----------------
savestring:
stosd
mov eax, ebx
stosd
mov eax, ecx
stosd
mov eax, edx
stosd
ret
;----------------
Not quite what you're looking for...
Best,
Frank