Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data Communication through parallel port

Posted on 1997-12-28
5
Medium Priority
?
328 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 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