****************************************************** GetCPUID: pushf ;Less than a 286. pop.w bx and.b #$F, bh push.w bx popf pushf pop.w cx dc.b $80,$E5,$F0 ;Not known by the compiler! dc.b $80,$FF,$F0 ;As above beq.s _CPU_Found ****************************************************** inc.b CPUIdent ;80286 dc.b $80,$CF,$F0 ;And again... push.w bx popf pushf pop.w cx dc.b $80,$E5,$F0 ; beq.s _CPU_Found ****************************************************** inc.b CPUIdent ;80386 dc.b $66 move.w sp, bx dc.b $66,$81,$E4,$FC,$FF,$00,$00 pushf.l pop.l d move.l d,c xor.l #$4000,d push.l d popf.l pushf.l pop.l d push.l c popf.l xor.l c,d and.l #$4000,d dc.b $66 move.w bx, sp beq.s _CPU_Found ****************************************************** inc.b CPUIdent ;80486 pushf.l pop.l d move.l d,c xor.l #$20000,d push.l d popf.l pushf.l pop.l d push.l c popf.l xor.l c,d beq.s _CPU_Found ****************************************************** inc.b CPUIdent ;80586 dc.b $0F,$A2 ;CPUID and.b #$F, ah asr.w #8, ax _CPU_Found: rts ****************************************************** CPUID dc.b "CPU=" CPUIdent dc.b "186",0 ;Start off life at the bottom.