🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13188

Re: windows print thru BIOS ??

#13188
From: Aaron Wallace
Date: Thu, 27 Jun 1991 18:15
37 lines
2553 bytes
In article <4039.2869b175@hayes.uucp> lleonard@hayes.uucp writes:
>I discovered a simple but sneaky way to get Windows to print to BIOS.
>Edit your WIN.INI file and go to the "[ports]" entry and then create 
>a port called "lpt1.=" - the key is the period.  If you have just
>"lpt1:=", Windows will intercept your data.  With the period, Windows
>is fooled into thinking it's printing to a file, then BIOS can get
>it.  I assume this same trick will work with prn, com1, etc.

It will.  The MS Resource Kit for Windows ($14.95) discusses this (and
why it works--it's not a bug or anything like that) and much else.  It's
a good way to get an intuition on how Windows does its thing.  And the Fish
program can't be beat--a great way to kill system performance and use
a $2000 machine as a $40 fish tank!

Oh, basically in the Ports section Windows looks for LPT1,2,3 and COM1,2,3.
If it finds these it uses the hardware.  Anything else is considered to be
a DOS device and is handled using DOS file open conventions.  LPT1.anything
is considered to be the printer by DOS.  Thus, you could probably hook up 
to PRN, AUX, NUL...  Wonder if CON works...?  EPT, for those of you with that
dreadful IBM PS printer, is handled as a DOS device.  You can probably put
filenames in the [ports] section, too, but there are already enough ways to
print to a file in Windows.  (Mac allusion:) Wonder if holding down command-K
after hitting OK to print works...?

BTW, the exception to the above is if Windows detects that the LPTx has been
redirected (i.e. thru mode).  If this is so, DOS is used.  So it's probably 
faster to be truthful to Windows than have it print to redirected ports.
A port is redirected when the port base in the BIOS data area is non-zero
and less than 100h.  In debug:

-d 40:0
0040:0000  aa aa bb bb cc cc dd dd - ee ee ff ff gg gg

The a-d's are the COM ports; the e-g's parallel ports.  Remember, this is
Intel stuff, so when you see FC 03 that's 03FC to us mortals...

Aaron Wallace
Technical Details
Message-ID: <1991Jun27.181554.21185@leland.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!stanford.edu!leland.Stanford.EDU!jessica.stanford.edu!aaron
References: <4039.2869b175@hayes.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!stanford.edu!leland.Stanford.EDU!jessica.stanford.edu!aaron
From: aaron@jessica.stanford.edu (Aaron Wallace)
Newsgroups: comp.windows.ms
Subject: Re: windows print thru BIOS ??
Message-ID: <1991Jun27.181554.21185@leland.Stanford.EDU>
Date: 27 Jun 91 18:15:54 GMT
Article-I.D.: leland.1991Jun27.181554.21185
References: <4039.2869b175@hayes.uucp>
Sender: Aaron Wallace
Organization: Academic Information Resources
Lines: 37