Program Detect386;
{Detect 80386 CPU
SOON to be commented! =)}
function is_386: boolean;
assembler;
asm
mov bx,sx
and sp,$fffc
pushfl
pop eax
mov ecx,eax
xor eax,$40000
push eax
popfl
pushfl
pop eax
xor eax,ecx
setz al
and sp,$fffc
push ecx
popfl
mov sp,bx
end ['eax','ebx','ecx'];
{Returning al=0 means FALSE}
begin
writeln('386:',is_386);
end.