[fpc-pascal] One experience with the unit serial
Henry Vermaak
henry.vermaak at gmail.com
Fri Nov 20 12:43:49 CET 2009
2009/11/20 Holger Bruns <holger.bruns at gmx.net>:
> Jonas Maebe schrieb:
>>
>> On 19 Nov 2009, at 14:30, Holger Bruns wrote:
>>
>>> Since iopl is still not available to fpc in its 64-bit-version, I should
>>> move to c for future port programming.
>>
>> $ man iopl
>> ...
>> This call is mostly for the i386 architecture. On many other
>> architec-
>> tures it does not exist or will always return an error.
>>
>> Switching to C will not cause this function to magically appear in the
>> Linux kernel on non-i386 systems.
>
> It is c, but now I simply need to know how to call c functions in pascal
> programs. I am using a linux kernel in version 2.6.28, and for this kernel
> version your quotation of "man iopl" seems not to be valid.
As the man page suggests:
"This call is necessary to allow 8514-compatible X servers to run
under Linux. Since these X servers require access to all 65536 I/O
ports, the ioperm() call is not sufficient."
What are you trying to achieve? The way to communicate with devices
in linux is to talk to the /dev nodes with read, write and ioctl.
Using inb is almost always the wrong thing to do.
Henry
More information about the fpc-pascal
mailing list