home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / hardware.swg / 0039_Parallel Port Input.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-26  |  836 b   |  25 lines

  1. {
  2. > Does anyone have experience reading data coming IN the parallel port?  I
  3. > can't find any technical literature saying it can be done, yet I know
  4. > there are tape backup machines that use the parallel port to backup and
  5. > restore data.
  6.  
  7. First you'd need to find the correct port:
  8. }
  9. Var
  10.   Lpt:Array[1..4] Of Word Absolute $40:$8;
  11.  
  12. { Then you can access the port like so: }
  13.  
  14. WriteLn('LPT1 contains ',Port[Lpt[1]]);
  15. WriteLn('LPT2 contains ',Port[Lpt[2]]);
  16.  
  17. {
  18. The next step would be to capture messages of incoming data - I've never done
  19. this successfully, but in theory it should be a matter of capturing Int $F
  20. for LPT1, $E for LPT2. Lpt3 & 4 depend on the irq, unless I am mistaken.
  21.  
  22. However, this still leaves decoding of information. I wouldnt have a clue how
  23. to do that. I imagine it's device-dependant.
  24. }
  25.