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.

Hi Jonas,

this seems to work on a 64-bit-system:

#include <sys/io.h>
int
main(int argc, char *argv[])
{
unsigned char b;

   if (iopl(3) == -1)
       perror("iopl");
   b = inb(0xec00);
   printf("b=%#x\n", b);
}

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.

Holger

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to