Solved

Easy Laplink in C

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
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.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

821 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