here is some code i wrote a few years back
maybe Gunther will find it useful :P
pushfd
mov ecx,240000h ;bit 21 = ID, bit 18 = 386/486
pop eax
mov edx,eax ;EDX = original
xor eax,ecx ;EAX = toggled
push eax
popfd ;EFLAGS = new
pushfd
pop eax ;EAX = new
push edx
popfd ;EFLAGS = original
xor eax,edx ;EAX = toggle result
and eax,ecx
;if EAX bit 18 is set, CPU is 486 or higher
;if EAX bit 21 is set, CPU supports CPUID instruction
;no versions of the 386 supported CPUID
;late versions of the 486 support CPUID