AnsweredAssumed Answered

vrf Parallel Port Base Address

Question asked by VRFuser on Oct 21, 2002
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META content="text/html; charset=iso-8859-1" http-equiv=Content-Type><META content="MSHTML 5.00.2919.6307" name=GENERATOR><STYLE></STYLE></HEAD><BODY bgColor=#ffffff><DIV>Hello Mark,</DIV><DIV> </DIV><DIV>The addresses of COM and LPT ports are stored in the pc's bios data area 0040:0000 thru 0040:00FF. I've retrieved these addresses in BASIC and in C but never in VEE. A while back there was a VEE PEEK/POKE utility that someone was circulating. I've never used it but it might be of some use in conjunction with the following.</DIV><DIV> </DIV><DIV>Here's how to use PEEK in BASIC to get the address of the printer ports:</DIV><DIV><FONT face="Courier New"></FONT> </DIV><DIV><FONT face="Courier New">DEF SEG = 0  'So we can use absolute addessing<BR>Lpt1 = PEEK(&H408) + 256 * PEEK(&H409)   'Get addr of LPT 1<BR>Lpt2 = PEEK(&H40A) + 256 * PEEK(&H40B)   'Get addr of LPT 2<BR></DIV></FONT><DIV>In C I set up a pointer to the bios data area. That would be of little use here.</DIV><DIV> </DIV><DIV>William J. Drago<BR>Automatic Test Engineering Consultant<BR>106 Overlook Drive<BR>East Islip, NY 11730<BR><A href=""></A><BR>631-277-1572</DIV><DIV> </DIV><BLOCKQUOTE style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>  <DIV   style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>   <A href="">Marc Engle</A> </DIV>  <DIV style="FONT: 10pt arial"><B>To:</B> <A   href="">VEE vrf</A> </DIV>  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 21, 2002 3:07   PM</DIV>  <DIV style="FONT: 10pt arial"><B>Subject:</B> [vrf] Parallel Port Base   Address</DIV>  <DIV><BR></DIV>  <DIV><FONT face=Arial size=2><SPAN class=413475518-21102002>      Good afternoon, fellow Vrf'ers.  Does anyone know how I might retrieve   the base address of a parallel port on a given machine using VEE?  Most   of my computers are running win2K and VEE 6.01.  All of the base   addresses for the original LPT1 port have been 0x378.  I have written a   program that takes advantage of a second parallel port added to the machines   (for control of a pick and place handler) and the address that is assigned to   that second parallel port differs on each machine.  I can always find the   base address by going to the control panel and then to the device manager, but   I'm trying to do this through VEE.  Any ideas would be appreciated and   thanks in advance for any help.</SPAN></FONT></DIV>  <DIV><FONT face=Arial size=2><SPAN   class=413475518-21102002></SPAN></FONT> </DIV>  <DIV><FONT face=Arial size=2><SPAN   class=413475518-21102002>Regards,</SPAN></FONT></DIV>  <P><FONT face=Arial size=2>Marc A. Engle</FONT> <BR><FONT face=Arial   size=2>Product Engineer</FONT> <BR><FONT face=Arial size=2>Digital Cellular   Product Line</FONT> <BR><FONT face=Arial size=2>RF Micro Devices, Inc.</FONT>   <BR><FONT face=Arial size=2>7628 Thorndike Road</FONT> <BR><FONT face=Arial   size=2>Mailstop : NC7628</FONT> <BR><FONT face=Arial size=2>Greensboro, NC   27409</FONT> <BR><FONT face=Arial size=2>Phone: 336-931-7445</FONT> <BR><FONT   face=Arial size=2>Fax: 336-931-7371</FONT> <BR><FONT face=Arial size=2>E-mail:</FONT> </P>  <DIV> </DIV>---<BR>You are currently subscribed to vrf as:<BR>To subscribe send a blank email to   "".<BR>To unsubscribe send a blank email to   "".<BR>To send messages to this mailing list,   email "". <BR>If you need help with the mailing   list send a message to "". </BLOCKQUOTE>---<BR>You are currently subscribed to vrf as:<BR>To subscribe send a blank email to "".<BR>To unsubscribe send a blank email to "".<BR>To send messages to this mailing list,  email "".  <BR>If you need help with the mailing list send a message to "".</BODY></HTML>