[fpc-pascal]1st post

Peter Vreman peter at freepascal.org
Wed Jun 16 08:51:41 CEST 2004

> Hello,
> At first, thanks and congratulations for Free Pascal.
> I am trying to convert all my libraries (big integers, big floats,
> etc) from Delphi 5 to Free Pascal 1.9.4. As a total newbie with Free
> Pascal, I have some questions.
> 1) In an assembler routine, is the direction flag managed like in
> Delphi, i.e., should a routine always restore DF=0?

Yes. That is part of the calling convention

> 2) " end [ {$IFNDEF REGCALL} 'eax','ecx', {$ENDIF} 'edi']; "
> Is the previous line meaningful? (See the routine below)

No, FPC 1.9.x follows standard calling conventions. The changed registers
are fixed. This information is not used for assembler procedures. But for
assembler blocks within a procedure the information is used.

> 3) When P is a PUI32 (PUI32 = ^Longword), I use Inc(P,Count) to
> increment P by Count (Count > 1). It compiles fine but there is the
> message "Conversion between ordinals and pointers are not not
> portable". What does it mean? Portable towards what? (I am compiling
> with {$MODE OBJFPC})

That is a bug, please submit it to the bug repository. The message means
that you are loading a pointer to an ordinal (=integer). This can lead to
problems when compiling for 64bit platforms like x86-64 (that is already
working and going to be supported in 1.9.6).

> 4) "Internal error 200310221". Let's say I have one program (set as
> primary file) and one unit. The only way to compile (and to build)
> both of them is to activate the unit window and to "build" from
> there. In all other cases, "compile" and "build" stop with this
> internal error. I suppose I didn't correctly configure something (?)
> (Windows 98, AMD 2600+)

That is a bug. Without sources we are not able to analyse and fix the
problem. Try to minize the problem (guess that will be hard) and send me
the sources so i can reproduce it.

More information about the fpc-pascal mailing list