Need help porting DOS app that uses parallel port

Need help porting DOS app that uses parallel port

Post by Chris A. Henes » Fri, 25 Jun 1999 04:00:00



I am porting some DOS software that makes use of two function apparently
located in a header file called dos.h  These function are outport, and
inport.  I am trying to find the linux equivilents.  The output function
takes two values (in HEX), one is the port address, the other is the data
to output.  The inport is a little more complicated, but I suspect the
function is the same.  Also the version of stdlib they used had a function
itoa to convert integers to characters.  Linux seems to have an atoi but
no itoa. Any advice here?

        Thanks,
        Chris A. Henesy

--
"(America is) a country where a dual morality, hypocrisy and nonsense have
been allowed to dominate politics and the mass media for years, and this
doesn't make it look so reliable as a world policeman..."
        -The Swedish Newspaper Aftonbladet

 
 
 

1. Need help porting DOS app that uses parallel port (Part II)

Randy Olinger spewed forth:

This is a computer interface board I bought from velleman
(www.velleman.be) and soldered together myself.  The card basicly hooks to
your parallel port and allows your PC to interact with any external
electronic device.  I has 16 digital outputs that can be turned on and
off, 16 digital inputs whose on/off status can be read, and a couple
analogue inputs and outputs as well.  I'm pretty darn sure there is no
linux driver for it.

What THEY provide with the board is a single C "function library"?
containing c functions for initializing and reading and writing to the
card.  This c file is meant to be compiled under DOS and uses functions
that read and write directly to the IO buffers of the port (inport and
outport).  They also provide several example programs which put together
the read and write function from the "function library" to make the card do
something interesting like turn a heater on if the temp drops.

So it sounds to me like the best thing for me to do is grab a copy of
"Linux Device Drivers" and "port" the "function library" into a device
driver.  The hard part is done really.  The C code detailing the
communications protocol with the card is provided.  I just have to add the
code to make it a kernel module, and to have it talk through the
appropriate kernel interfaces to the parallel port and not directly
to the hardware.  How close am I here?  Anyone have any suggestions as to
which kernel modules I should use as an example?  What kernel code I
should look at to start with?

        Thanks for any and all help,
        Chris

--
"(America is) a country where a dual morality, hypocrisy and nonsense have
been allowed to dominate politics and the mass media for years, and this
doesn't make it look so reliable as a world policeman..."
        -The Swedish Newspaper Aftonbladet

2. NIS setup on linux client

3. Need help porting DOS app over to Linux

4. Linux WAN

5. parallel port printer and parallel port superdisk

6. disappearing printer

7. trying to write a module which uses parallel port, but inb( port ) is always the same

8. TV card with new Conexant chip cx23881

9. Multiple parallel ports/IRQ sharing/non-use of IRQ by parallel ports?

10. Using a parallel port as a serial port

11. Porting Dos/Windows apps to Linux/X using gnu

12. Problem adding tty port using 128 Port Async Adapter with 16 port Async Node

13. HELP using Mountain parallel port CD drive to be recognized by Linux