On Fri, September 12, 2014 17:15, Xiangrong Fang wrote:
> I found this code on the net:
>
> http://code.google.com/p/fpos/source/browse/kernel/cpuid.pas?r=c387b381d7a05f9328693cdcf59b0b4f633294e4
>
> It's part of the "FreePascal Operationg System" project. I suppose it is
> compatible with FreePascal of course. But while compiled, I got lots of
> errors, such as:
>
> cpuid.pas(28,3) Error: Unrecognized opcode pushfd
> cpuid.pas(29,10) Error: Unknown identifier "EAX"
> cpuid.pas(30,13) Error: Unknown identifier "EDX"
>
> Even I added {$mode objfpc}{$H+} does not help.
 .
 .

This code uses Intel syntax of assembler routines. You need to add
{$ASMMODE INTEL} before the assembler block, or use one of compilation
modes using this assembler mode by default (such a {$MODE DELPHI} or
{$MODE TP}).

Tomas


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to