Hi,
I'm currently trying to port an old procedure written in TMT Pascal to a program written in Lazarus 4.2. The procedure is supposed to recognize the presence of a CPUID.
Unfortunately, during compilation, I get a message that the pushfd and popfd commands are not recognized (see the attachement). Has anyone encountered this situation?
Here is the code:
{$ASMMODE INTEL}
function CPUID_PRESENT : boolean; assembler;
asm
pushfd // save flags
pop EAX
mov EBX, EAX
xor EAX, $00200000 // switch $00200000 cell
push EAX
popfd // save changed flags
pushfd
pop EAX
cmp EAX, EBX
jz @NO_CPUID // are the flags still changed? if not - there's no cpuid
mov AL, 1
@NO_CPUID:
end;