[fpc-pascal] fpc-2.1.4.x86_64-win64.exe: Hello World program with ASM, compilation aborted ? Error: Unknown identifier "EAX" ???

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Jul 26 09:49:24 CEST 2007


On 26 Jul 2007, at 09:02, Skybuck Flying wrote:

> Y:\Free Pascal\Tests\Hello World>ppcrossx64 HelloWorld
> HelloWorld.pas(7,10) Error: Unknown identifier "EAX"
> HelloWorld.pas(7,12) Error: Unknown identifier "ECX"
> HelloWorld.pas(7,12) Error: Asm: [mov ???,???] invalid combination  
> of opcode and
> operands
> HelloWorld.pas(14,4) Fatal: There were 3 errors compiling module,  
> stopping
> Fatal: Compilation aborted
>
> Surely it's possible to write assembler code in free pascal ?

Yes, but the default syntax is AT&T, not Intel. I assume you are  
coming from a Delphi background, so you can probably best solve this  
and many future issues you would otherwise encounter by adding {$mode  
delphi} at the top of all of your source files (or compile with - 
Mdelphi).


Jonas



More information about the fpc-pascal mailing list