[fpc-pascal] accessing hardware ports in FPC

Daniël Mantione daniel.mantione at freepascal.org
Tue May 22 11:07:48 CEST 2007

Op Tue, 22 May 2007, schreef Felipe Monteiro de Carvalho:

> OS specific code is not a devil. Sometimes it's necessary. Ports alone
> won't work on linux also, by the way.

Even if extra calls are needed, like ioperm, the existance of a hardware 
serial port unit, ignoring the existance of ioperm, can be very usefull 
for a Linux programmer, as long as it uses the portable port[] array.
An ioperm call is easily added to any program.

It is the same for WinNT, while the programmer might have to do extra 
tricks, existing code can be very valueable for him.

Needless to say I don't recommend people driving hardware by port access, 
but some people feel/have the need to. There is no need why such code 
should be different on WinNT than on Win95; FPC's task is to hide such 
differences from the user.


More information about the fpc-pascal mailing list