?
Solved

Data Communication through parallel port

Posted on 1997-12-28
5
Medium Priority
?
325 Views
Last Modified: 2008-03-04
How do I program data communication thruogh parallel port
In DOS, C or assemble are OK
If has sample code is better
0
Comment
Question by:ginaa
[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
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
rbr earned 100 total points
ID: 1017446
Use interrupt 17h

void InitPrinter (int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,&register,&register);
}

sendbyte(int printer,unsigned char byte)
{
union REGS register;

register.h.ah=0;
register.l.al=byte;
register.x.dx=printer;
int86(0x17,&register,&register);
}

int getstatus(int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,&register,&register);
return ((int)register.h.ah));
}

0
 

Author Comment

by:ginaa
ID: 1017447
Sorry, I guess I don't say clear
I want to transfer data between two computers through parallel port (like LL3, LL5, DOS' Interlnk...)
I mean can a parallel port works like a serial port?

0
 
LVL 2

Expert Comment

by:PHOENIX
ID: 1017448
If both machines have windows95, use DIRECT CONNECT and a direct connect cable to the parallel ports..
0
 
LVL 10

Expert Comment

by:rbr
ID: 1017449
You can use these functions to work in both directions with these routines. I did this to controll a A/D-converter. You can use the Paper Out, the Busy and the online pin to receive data via the getstatus routine. Connect 3 pins of the 8 data pins with these 3  pins (busy, paper out, online) and vice versa and send the data with send byte.
Status-Byte:
Bit 0: Time out
Bit 4: online
Bit 5: paper out
Bit 7: Busy
0
 

Author Comment

by:ginaa
ID: 1017450
Thank you very much
But do you have any sample code for this, any code in DOS (C,
assembly will be OK)

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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