🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.misc
Article #122

Re: Qbasic, XP, parallel port

#122
From: Stephen J. Rush
Date: Thu, 04 Mar 2004 17:34
42 lines
3305 bytes
On Thu, 04 Mar 2004 16:31:09 +0000, Fritz Oppliger wrote:

> On Thu, 04 Mar 2004 13:44:39 GMT, Phred <ppnerkDELETETHIS@yahoo.com> wrote:
> 
> 
>> There's also a possible [expensive, commercial] solution at:
>>    http://www.dosprint.com/
>> (But they do seem to have a demo available to try.)
>>
>> <quoting from the home page>
>> Our DOSPRINT modules let you use your existing DOS programs to PRINT
>> your data on any WINDOWS supported printer! (Note: DOSPRINT/DLLPRINT
>> require the DOS application be running under a 32-bit Windows
>> operating system. And, DOSPRINT/DLLPRINT are completely compatible
>> with all WIN versions: 95/98/ME/NT/2000/XP.)
>> </quoting>
> 
> Nah, I am not trying to print. I am bit-banging, controlling (trying to!)  
> homemade devices like a digital temperature sensor and digital ADC, etc.
> Thanks anyway.

You could try installing (in the Windows sense) a plain-ASCII
printer like one of the Epson MX series or the "generic Teletype-like
printer."  These DOS-era printers do their own character-to-bitmap
translation, so the Windows driver just sends bytes to the parallel port,
without the rasterization required by Winprinters. You can then send any
byte to the parallel port from a QuickBasic program with

LPRINT CHR$(Byte%);

You can concatennate multiple bytes into a string variable and LPRINT
that, but don't forget the trailing semicolon.  Without it, you'll get a
CRLF pair, CHR$(13) + CHR$(10), appended to your string.

Reading the parallel port isn't as easy, because the original printer port
only had four input lines, used for printer status information.  Later
enhanced printer ports can read eight bits at once, but these are
post-Windows improvements.  Try a Web search on "PC EPP" and "PC ECP."

If nothing else works, you can build a genuine DOS environment in its own
partition, using something like Partition Magic and FreeDos (see
www.freedos.org).
Technical Details
Message-ID: <pan.2004.03.04.17.34.34.347899@cox.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!green.octanews.net!news-out.octanews.net!news.glorb.com!cox.net!news-xfer.cox.net!p01!lakeread05.POSTED!not-for-mail
References: <764380f6c7300e3284ef133d22aa0a0b@news.teranews.com> <40466628.600652512@news.comporium.net> <c27bnb$1prg44$1@ID-151056.news.uni-berlin.de> <3fd175c0ebb63f07c3fe87ff53adf259@news.teranews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c949,c6c86b1341e74485
X-Google-Attributes: gid10c949,public
X-Google-Thread: 108c83,90340131abbe8312
X-Google-Attributes: gid108c83,public
X-Google-ArrivalTime: 2004-03-04 09:34:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!green.octanews.net!news-out.octanews.net!news.glorb.com!cox.net!news-xfer.cox.net!p01!lakeread05.POSTED!not-for-mail
From: "Stephen J. Rush" <steverush1@cox.net>
Subject: Re: Qbasic, XP, parallel port
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2004.03.04.17.34.34.347899@cox.net>
Newsgroups: comp.lang.basic.misc,aus.computers
References: <764380f6c7300e3284ef133d22aa0a0b@news.teranews.com> <40466628.600652512@news.comporium.net> <c27bnb$1prg44$1@ID-151056.news.uni-berlin.de> <3fd175c0ebb63f07c3fe87ff53adf259@news.teranews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 43
Date: Thu, 04 Mar 2004 11:34:34 -0600
NNTP-Posting-Host: 68.11.43.225
X-Complaints-To: abuse@cox.net
X-Trace: lakeread05 1078421674 68.11.43.225 (Thu, 04 Mar 2004 12:34:34 EST)
NNTP-Posting-Date: Thu, 04 Mar 2004 12:34:34 EST
Organization: Cox Communications