[fpc-pascal] ASM Converting from Turbo Pascal

Rainer Stratmann RainerStratmann at t-online.de
Tue Aug 29 09:49:54 CEST 2006


Hello,

in fpc you have to tell the compiler which registers are used in asm code.

for example

asm
       mov  ax,123
end [eax];

Is it possible to make a compilerswitch that the compiler tells that there is 
every register used in asm code? In this case it woult be possible to port 
asm code from turbopascal to fpc without any change.

for example

{$asmallregsused+} or something like that

asm
        ...asmcode...
        ...asmcode...
        ...asmcode...
        ...asmcode...
end;     --->>> now every Register used, as set in the compilerswitch;

Rainer



More information about the fpc-pascal mailing list