//cause standard PCI parallel port card to go to EPP mode
#include <asm/io.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
  int base_addr, extctrl_addr;
  if (argc==1)
    printf("must enter parallel port I/O address\n");
  if (argc > 1) {
    if (1==sscanf(argv[1],"%x",&base_addr)) {
      iopl(3) ;//turn on access to all I/O
      extctrl_addr = base_addr + 0x402;
      outb(0x80,extctrl_addr);  // set for EPP mode
      printf("wrote 0x80 to 0x%x\n",extctrl_addr);
    }
  }
  return 0;
}


