Or if you want to bang on the hardware directly with some C code heres
a start.
Also see: http://www.tldp.org/HOWTO/mini/IO-Port-Programming.html#toc6

/*----------------------------------------------------------------------
| gcc -O1 toggle.c -o toggle
|-----------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>    /* raw-raw! kernel headers rule! :) */
#include <asm/io.h>   /* (glibc's kernel headers that is) */
#include <sys/perm.h>

int main(int argc, char *argv[])
{
  int stat, i;

  if (ioperm(0x378, 3, 1)) {
    printf("can't get IO permission\n");
    exit(1);
  }

  printf("toggling printer pins\n");
  for (i=0; i<100; i++) {
    outb(0xff, 0x378);
    usleep(10000);
    outb(0x00, 0x378);
    usleep(10000);
  }

  stat = inb(0x379);
  printf("Inputs = %xH\n", stat);

  ioperm(0x378, 3, 0);
  return 0;
}

#if 0
/****************
Some printer hardware notes(see IBM PC tech manual for schematics):
|  status port:               control port:             
|  8H - -error                1h - +strobe     neg logic
| 10H - +slct  <pos logic>    2h - +auto_feed  neg logic
| 20H - +PE    <pos logic>    4h - -init       pos logic
| 40H - -ack                  8h - +slct_in    neg logic
| 80H - -busy                10h - +irq
|                            20h - +enable read bus
|
MS-DOS PRINTER PORT-OUT

        1 -STROBE   -->  1H X7A       PORT X7A 20H - enable data read.
        2 D0        -->  1H X78       PORT X7A 10H - IRQ enable intr on
        3 D1        -->  2H X78                      "-ACK" true to false
        4 D2        -->  4H X78
        5 D3        -->  8H X78
        6 D4        --> 10H X78
        7 D5        --> 20H X78
        8 D6        --> 40H X78
        9 D7        --> 80H X78
       10 -ACK     <--  20H X79
       11 BUSY     <--  80H X79
       12 PE       <--  20H X79
       13 SLCT     <--  10H X79
       14 -AUTO_FD  -->  2H X7A
       15 -ERROR   <--  10H X79
       16 +INIT     -->  4H X7A
       17 -SLCT_IN  -->  8H X7A
    18-25 GRND     <-->
 ****/
#endif


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list