Solved

Easy Laplink in C

Posted on 1998-06-29
2
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

695 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