Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Easy Laplink in C

Posted on 1998-06-29
2
Medium Priority
?
243 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

916 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