Hello

I need to work out some parallel port output signals.

I found a short program to test bits on that port.
It tells I need to set the permission with ioperm() as this:

#include <asm/io.h>
#include <iostream>
#include <cstdlib>
#include <unistd.h>

#define base 0x378           /* printer port base address */
#define value 255            /* numeric value to send to printer port */

using namespace std;

main(int argc, char **argv)
{
   if (ioperm(base,1,1))
    fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);

   outb(value, base);
}

but when i try to compile it reports error:
`ioperm' undeclared (first use this function)

help pls.

What operating system are you using? That is a linux function and not supported in MS-Windows. But if you are using linux then I don't know the answer because I don't have a linux computer available to me where I am at.

This question has already been answered. Start a new discussion instead.