Solved

Easy Laplink in C

Posted on 1998-06-29
2
233 Views
Last Modified: 2010-04-15
I'm trying to begin an easy program to transfer information trought LPT1 form my Pentium to my 386. I want to do an simple laplink in mode DOS but I don't know how are the steps more important that I have to do, like how to use LPT1, how "talk" with it. Thanks.
0
Comment
Question by:netkuk
2 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 50 total points
ID: 1251489
The parallel port interface consists primarily of two registers. For LPT1: it has 0x378 as a data register and 0x37a as a control register. To send data out of the port you out the data to 0x378 then strobe the control register by raising bit 0 on the control register, then lowering it again.
To receive data you must enable interrupts and reverse the direction of the parallel port: out 0x30 to the control register. Then, when you receive an IRQ7, process the interrupt normally and read out the contents of the data register (in on 0x378). You may also need to in on 0x379 to reset the parallel port interrupt mechanism.

0
 

Author Comment

by:netkuk
ID: 1251490
Thanks a lot
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now