Well, on Wikipedia, there’s an example (x86_64 only) assembly listing for this very purpose (for the X86_64 architecture, however; not for your CPU):
.section .data
s0 : .asciz "Processor Brand String: %.48s\n"
err : .asciz "Feature unsupported.\n"
.section .text
.global main
.type main,@function
.align 32
main:
pushq %rbp
movq %rsp, %rbp
subq $48, %rsp
pushq %rbx
movl $0x80000000, %eax
cpuid
cmpl $0x80000004, %eax
jl error
movl $0x80000002, %esi
movq %rsp, %rdi
.align 16
get_brand:
movl %esi, %eax
cpuid
movl %eax, (%rdi)
movl %ebx, 4(%rdi)
movl %ecx, 8(%rdi)
movl %edx, 12(%rdi)
addl $1, %esi
addq $16, %rdi
cmpl $0x80000004, %esi
jle get_brand
print_brand:
movq $s0, %rdi
movq %rsp, %rsi
xorb %al, %al
call printf
jmp end
.align 16
error:
movq $err, %rdi
xorb %al, %al
call printf
.align 16
end:
popq %rbx
movq %rbp, %rsp
popq %rbp
xorl %eax, %eax
ret
Dump this code in a file, say cpumodel.S
, and compile it with gcc/gas:
gcc cpumodel.S -o cpumodel
Afterwards, you can run it:
$ ./cpumodel
Processor Brand String: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
This method probably won’t work for you, since it seems Pentium 4/D CPUs don’t have their model name available this way. As you can see here, the CPUID data doesn’t contain what you want.