🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.visualbasic.ver3
Article #50

Re: VB4 16-bit and parallel port

#50
From: cohalloran
Date: Thu, 21 Jun 2001 15:25
50 lines
3720 bytes
On Thu, 21 Jun 2001 00:05:08 -0500, agreenb@uab.NOSPAM.edu (Adam
Greenberg) wrote:

>Ok, I wrote a program about 2 years ago that will poll the "busy" pin on 
>the parallel port.  It's accepting a TTL pulse and waits for a change in 
>status value before doing something.  It was compiled as 16-bit on a 
>laptop running Win98.  We got a new laptop and I tried moving the 
>executable over and it didn't work (after intalling all the necessary 
>16-bit dlls into Win/Sys directory).  Then I tried recompiling and that 
>didn't work.  So, I downgraded the new laptop to Win98 and that didn't 
>work either.  I am using the interrupt function in vbasm.dll to gain 
>access to the port.  It seems to be able to read from the port once and 
>then (although the TTL value changes) the value read doesn't change the 
>way it used to.  Anyone know why this would not work on a new laptop?  
>Also, in the BIOS I noticed that there are the following options for the 
>"mode" of parallel port:  output only, bi-directional, EPP, and ECP.  
>Anyone know which of these is best for what I'm doing?  Unfortunately, I 

Was it set to Output only?  I'd first try bidirectional.  I've long
since forgotten what EPP and ECP stand for, but I'd try those next.
Pretty sure when the output only mode is set, that the parallel port
doesn't care if there is a busy or not.




>don't have access to the old laptop anymore so I can't look up the BIOS 
>settings on that one, but I'm sure they were standard settings (whatever 
>those are).  Here's the snippet of code that calls the busy pin:
>
>Global Const IntNum = &H17
>
>'power the device by turning on data lines
>InRegs.AX = &H7
>InRegs.DX = &H0
>Call vbRealModeIntX(IntNum, InRegs, OutRegs)
>'Status Request Parameters
>InRegs.AX = &H2000
>InRegs.DX = &H0
>TriggStat = OutRegs.AX
>
>'Read from the port
>Call vbRealModeIntX(IntNum, InRegs, OutRegs)
>TriggStat = OutRegs.AX
>Text1.Text = TriggStat
>
>Maybe my addresses are off for the new machine?  I never really 
>understood how those worked (I lifted them from something else I saw and 
>they just worked).  Thanks for any and all help.
>-Adam
Technical Details
Message-ID: <3b321162.7771564@news.mia.bellsouth.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!news-out.nibble.net!hub1.nntpserver.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!e420r-sjo4.usenetserver.com!newsfeed.usenetserver.com!e3500-atl1.usenetserver.com.POSTED!not-for-mail
References: <agreenb-2106010005080001@dsl-64-34-93-149.telocity.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c949,bbe90fa7170f1617
X-Google-Attributes: gid10c949,public
X-Google-Thread: 108062,bbe90fa7170f1617
X-Google-Attributes: gid108062,public
X-Google-Thread: f5f6f,bbe90fa7170f1617
X-Google-Attributes: gidf5f6f,public
X-Google-Thread: 1023e1,bbe90fa7170f1617
X-Google-Attributes: gid1023e1,public
X-Google-Thread: 10ab99,bbe90fa7170f1617
X-Google-Attributes: gid10ab99,public
X-Google-ArrivalTime: 2001-06-21 08:29:38 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!news-out.nibble.net!hub1.nntpserver.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!e420r-sjo4.usenetserver.com!newsfeed.usenetserver.com!e3500-atl1.usenetserver.com.POSTED!not-for-mail
From: cohalloran@my-dejanews.com (cohalloran)
Newsgroups: alt.comp.lang.visualbasic.ver3,alt.lang.basic,comp.lang.basic.misc,comp.lang.basic.visual.3rdparty,cz.comp.lang.basic.visual
Subject: Re: VB4 16-bit and parallel port
Message-ID: <3b321162.7771564@news.mia.bellsouth.net>
References: <agreenb-2106010005080001@dsl-64-34-93-149.telocity.com>
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 51
X-Complaints-To: abuse@usenetserver.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
NNTP-Posting-Date: Thu, 21 Jun 2001 11:19:51 EDT
Organization: BELLSOUTH.net & WebUseNet Corp - "ReInventing the UseNet"
Date: Thu, 21 Jun 2001 15:25:18 GMT