[fpc-pascal] Acces IO-ports in Linux with FPC 2.2.0

Marc Santhoff M.Santhoff at web.de
Thu Mar 5 20:43:30 CET 2009

Am Donnerstag, den 05.03.2009, 18:49 +0200 schrieb Iisakki Kosonen:
> Hi,
> I am developing a free pascal software in Linux, which uses the
> parallel digital input/output card (with intel 8255) in an industrial PC.
> I was able to compile and run without problems with FP 2.0.4.
> Now, that the oldlinux unit is removed in the latest FPC,
> I cannot compile the program any more.
> The error messages are:
> - identifier not found "fdOpen"
> - identifier not found "fdWrite"
> - identifier not found "fdRead"
> I have tried replacing the oldlinux with other FP units including:
> SysUtils, Baseunix, Unix, UnixUtil, but it did not help.
> Only adding the Unix-unit helped a bit, because then the following
> error messages disappeared (constants):
> - Intentifier not found "OpenRdWr"
> - Intentifier not found "OpenSync"
> Could someone tell, what to do in order to compile
> the code with: fdOpen, fdWrite and fdRead in FP 2.2.X
> Or is there another solution to access the parallel IO-cards,
> may be there is a piece of software for this already ?

If you are using real files or named devices you could switch to using
"sysutils". There you'll find "FileOpen", "FileREad" and so on. The
modes are called "fmOpenRead", ...

Search through the rtl.pdf. I think these should be cross platform. For
using "BaseUnix" the same doc has the names of the modes in the chapter
fitting the unit name.

Marc Santhoff <M.Santhoff at web.de>

More information about the fpc-pascal mailing list