Solved

Easy Laplink in C

Posted on 1998-06-29
2
232 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
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.

760 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

24 Experts available now in Live!

Get 1:1 Help Now